Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocId Map #51

Closed
michaelsena opened this issue Jul 13, 2020 · 4 comments
Closed

DocId Map #51

michaelsena opened this issue Jul 13, 2020 · 4 comments

Comments

@michaelsena
Copy link
Member

michaelsena commented Jul 13, 2020

cip: 10
title: DocId Map
author: Michael Sena (@michaelsena), Joel Thorstensson (@oed)
status: Draft
category: Standards
type: RFC
created: 2020-07-13
requires: Tile Doctype (CIP-8)

Simple Summary

The DocId Map defines a document that stores mappings from strings to Ceramic DocIds.

Abstract

For many use cases of Ceramic it is desirable to create a document that simply stores a list of mappings from a property to a value where the property is a string and the value is a Ceramic DocId.

Motivation

Such a standard would be helpful in defining a basic schema that many in the Ceramic ecosystem can use when creating documents.

Specification

The DocId Map specification consists of a doctype, a schema, and a tag.

Doctype

The DocId Map is defined in a Tile Doctype (CIP-8).

Schema

The DocId Map schema defines a document which maintains a list of properties that must be strings and values that must be Ceramic docIds. These rules will be enforced by the Ceramic protocol.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "title": "DocIdMap",
  "additionalProperties": {
    "$ref": "#/definitions/CeramicDocId"
  },
  "definitions": {
    "CeramicDocId": {
      "type": "string",
      "pattern": "^ceramic://.+(\\?version=.+)?"
    }
  }
}

Tags

When creating a document that conforms to the DocId Map schema, add DocIdMap to the tags field.

Rationale

This proposal is fairly straightforward and no other design considerations were made.

Implementation

DocId Map Schema: This version of the DocId Map schema can be found at ceramic://bafy.../?version (will update after it is deployed)

Usage

When creating a new document that conforms to the DocId Map schema, you should include in the document header the schema version included above in the schema property and a DocIdMap tag in the tags property.

Security Considerations

None

Copyright

Copyright and related rights waived via CC0.

@michaelsena michaelsena changed the title DocId Map Schema DocId Map Jul 13, 2020
This was referenced Jul 14, 2020
This was referenced Jul 21, 2020
@simonovic86
Copy link

@michaelsena @oed updated the schema

@oed
Copy link
Member

oed commented Jul 28, 2020

@simonovic86 We should just force it to be a DocId of the form ceramic://.... The other format of docId is only needed when representing Ceramic documents in the http client.

@simonovic86
Copy link

@oed I'll remove the v0 format. Also, we should think about refactoring the HTTP client API.

@oed
Copy link
Member

oed commented Sep 24, 2020

Closing, stale

@oed oed closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants