-
-
Notifications
You must be signed in to change notification settings - Fork 314
Standardize format of meta-schemas. #186
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft/hyper-schema#", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the draft 4 version had the URI of draft-4/hyper-schema, why do we not use the URI of draft-5/hyper-schema? (Or will that be a later PR?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because this is for "master" so it's not a numbered draft (at least that's how @awwright set it up and I was trying to not change it- take a look at the "id" of the hyper-schema). |
||
"id": "http://json-schema.org/draft/links#", | ||
"title": "Link Description Object", | ||
"type": "object", | ||
"required": [ "href" ], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. draft 4 version at https://github.com/json-schema-org/json-schema-org.github.io/blob/master/draft-04/links#L6 includes "rel" as required. Was this changed in draft 4? (Just checking) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it was changed in draft 5. I made those changes later in the sequence for hyper-schema.json but forgot to "backport" links.json to a draft-4-compatible state. I just pulled it over as-is from the draft 5 changes I made on the website. I can change it if preferred. |
||
"properties": { | ||
"href": { | ||
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing", | ||
"type": "string" | ||
}, | ||
"rel": { | ||
"description": "relation to the target resource of the link", | ||
"type": "string" | ||
}, | ||
"title": { | ||
"description": "a title for the link", | ||
"type": "string" | ||
}, | ||
"targetSchema": { | ||
"description": "JSON Schema describing the link target", | ||
"allOf": [ { "$ref": "hyper-schema#" } ] | ||
}, | ||
"mediaType": { | ||
"description": "media type (as defined by RFC 2046) describing the link target", | ||
"type": "string" | ||
}, | ||
"method": { | ||
"description": "specifies that the client can construct a templated query (\"get\") or non-idempotent request (\"post\") to a resource.", | ||
"type": "string" | ||
}, | ||
"encType": { | ||
"description": "The media type in which to submit data along with the request", | ||
"type": "string", | ||
"default": "application/json" | ||
}, | ||
"schema": { | ||
"description": "Schema describing the data to submit along with the request", | ||
"allOf": [ { "$ref": "hyper-schema#" } ] | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see readOnly in draft-5 (aka latest), so am happy with this.