Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Update to Draft 4 of JSON-Schema #16

Closed
zuiderkwast opened this issue Mar 19, 2014 · 5 comments
Closed

Update to Draft 4 of JSON-Schema #16

zuiderkwast opened this issue Mar 19, 2014 · 5 comments

Comments

@zuiderkwast
Copy link
Contributor

What needs to be done

  • Small adjustments of current code (some renamed things: divisibleBy to multipleOf, readonly to readOnly, ...)
  • Add the new things that are not yet implemented to the README.

Considerations

  • Should we keep backwards compatibility with draft 3 when possible (keep renamed and/or deleted things: readonly, divisibleBy, extends, disallow, type=any) or drop them?
  • A flag for which draft to validate against? (Intuitively, I doen feel it's an attractive thing to do.)

Change logs for draft 4

Core schema:

  • Initial draft.
  • Salvaged from draft v3.
  • Mandate the use of JSON Reference, JSON Pointer.
  • Define the role of "id". Define URI resolution scope.
  • Add interoperability considerations.

Validation schema:

  • Initial draft.
  • Salvaged from draft v3.
  • Redefine the "required" keyword.
  • Remove "extends", "disallow"
  • Add "anyOf", "allOf", "oneOf", "not", "definitions",
    "minProperties", "maxProperties".
  • "dependencies" member values can no longer be single strings;
    at least one element is required in a property dependency
    array.
  • Rename "divisibleBy" to "multipleOf".
  • "type" arrays can no longer have schemas; remove "any" as a
    possible value.
  • Rework the "format" section; make support optional.
  • "format": remove attributes "phone", "style", "color"; rename
    "ip-address" to "ipv4"; add references for all attributes.
  • Provide algorithms to calculate schema(s) for array/object
    instances.
  • Add interoperability considerations.

Hyper schema:

  • Resolution of link URIs ("href") is now affected by rel="self"
    links on the instance
  • Define "title" for LDOs
  • Use URI Templates for the "href" property
  • Split hyper-schema definition out from main schema.
  • Capitalised the T in "encType", and the O in "readOnly"
  • Moved "mediaType" and "contentEncoding" to the new "media"
    property (renamed "type" and "binaryEncoding")
  • Added "mediaType" property to LDOs
  • Replaced "slash-delimited" fragment resolution with "json-
    pointer".
  • Added "template" LDO attribute.
  • Improved wording of sections.
@varnerac
Copy link

Regarding the considerations listed, I think using the $schema keyword and supporting URIs is a sensible solution.

http://tools.ietf.org/id/draft-zyp-json-schema-04.html#rfc.section.6

@Cy6erBr4in Cy6erBr4in self-assigned this Oct 5, 2014
@Cy6erBr4in
Copy link
Contributor

this is ongoing

@wpjunior
Copy link

wpjunior commented May 6, 2015

+1

1 similar comment
@voluntas
Copy link

+1

@richcarl
Copy link
Contributor

Closing. See for-GET/jesse#4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants