Skip to content

Conversation

@LiranCohen
Copy link
Member

@LiranCohen LiranCohen commented Sep 4, 2024

First pass at specifying tags in Protocol Definitions and RecordsWrite descriptor.

Satisifies: #279

@LiranCohen LiranCohen force-pushed the lirancohen/tags-definition branch from e2aef01 to d7a0b7c Compare September 4, 2024 13:48
@LiranCohen LiranCohen marked this pull request as ready for review September 4, 2024 14:31
@andorsk
Copy link
Collaborator

andorsk commented Sep 4, 2024

awesome. Thank you @LiranCohen

@andorsk andorsk added the stage: needs review needs review label Sep 4, 2024
"image": {
"dataFormat": ["image/jpeg", "image/png", "image/gif"],
}
} }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} }
}

"category": {
"type": "array",
"minItems": 1,
"maxItems": 5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"maxItems": 5
"maxItems": 5,

- The object ****MAY**** contain a `$tags` property; if present, its value ****MUST**** be an object with defined constraints:
- `$requiredTags` (optional) is an array that lists required tag names.
- `$allowUndefinedTags` (optional) is a boolean that defaults to false, and if set to false, undefined tags are not allowed.
- The constraints are a subset of JSON Schema that may include properties such as `type`, `enum`, `minimum`, `maximum`, `minLength`, `maxLength`, and others.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type required. make clear explicit.

Suggested change
- The constraints are a subset of JSON Schema that may include properties such as `type`, `enum`, `minimum`, `maximum`, `minLength`, `maxLength`, and others.
- The constraints are a subset of JSON Schema that may include properties such as `type` (required), `enum`, `minimum`, `maximum`, `minLength`, `maxLength`, and others.

- The _Protocols Definition_ object ****MUST**** contain a `structure` property, and its value ****MUST**** be a _Record Rules_ object whose keys match the labels defined in the _Protocols Definition_ object. This object is recursive, allowing subsequent record relationships to be defined within. Labeled members of the object are composed as follows:
- The keys of the object ****MUST**** be a string that matches one of the `types`
- The values representing those keys within the object ****MUST**** be an object composed as follows:
- The object ****MAY**** contain a `$tags` property; if present, its value ****MUST**** be an object with defined constraints:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Tags are not encrypted, please be careful about what you put in a tag.

Copy link
Collaborator

@andorsk andorsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small tweaks, but goal to have it merged by next session

@andorsk andorsk mentioned this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants