You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cip: 88
title: Ceramic namespace in JSON schemas
author: Paul Le Cam (@PaulLeCam)
status: Draft
category: Standards
type: RFC
created: 2021-03-01
Simple Summary
Define a standard extension point for Ceramic-specific metadata in a JSON schema.
Abstract
This CIP defines a reserved namespace for Ceramic-specific metadata in a JSON schema, along with a reference table for standard uses of this namespace.
Motivation
As commented in #82 (comment) the $id cannot be used to define Ceramic-specific extensions as intended in CIP-82, so creating a custom namespace for Ceramic-specific metadata should be a safer option to enable further extensions.
Specification
Namespace
A JSON schema property can contain a $ceramic field, that must be an object with a unique type defined in the following reference table, for example:
{type: 'string',maxLength: 150,$ceramic: {type: 'tile',schema: '<schema docID or commitID>',},}
Using the $ceramic property should be consistent with other $-prefixed metadata properties in JSON schemas, avoiding possible conflicts with other property names.
A unique type, along with possible type-specific additional properties, should make it easy to add custom extensions and build tools (simple checks for existence of $ceramic property and type-specific logic, TypeScript interfaces and inference, etc.).
Finally, providing a reference table in this CIP should allow for easy discovery and avoid conflicts between extensions.
Backwards Compatibility
CIP-82 and CIP-85 will get updated to this new format.
cip: 88
title: Ceramic namespace in JSON schemas
author: Paul Le Cam (@PaulLeCam)
status: Draft
category: Standards
type: RFC
created: 2021-03-01
Simple Summary
Define a standard extension point for Ceramic-specific metadata in a JSON schema.
Abstract
This CIP defines a reserved namespace for Ceramic-specific metadata in a JSON schema, along with a reference table for standard uses of this namespace.
Motivation
As commented in #82 (comment) the
$id
cannot be used to define Ceramic-specific extensions as intended in CIP-82, so creating a custom namespace for Ceramic-specific metadata should be a safer option to enable further extensions.Specification
Namespace
A JSON schema property can contain a
$ceramic
field, that must be an object with a uniquetype
defined in the following reference table, for example:Reference table
tile
Rationale
Using the
$ceramic
property should be consistent with other$
-prefixed metadata properties in JSON schemas, avoiding possible conflicts with other property names.A unique
type
, along with possible type-specific additional properties, should make it easy to add custom extensions and build tools (simple checks for existence of$ceramic
property and type-specific logic, TypeScript interfaces and inference, etc.).Finally, providing a reference table in this CIP should allow for easy discovery and avoid conflicts between extensions.
Backwards Compatibility
CIP-82 and CIP-85 will get updated to this new format.
Implementation
None yet.
Security Considerations
None I'm aware of.
Copyright
Copyright and related rights waived via CC0.
The text was updated successfully, but these errors were encountered: