Skip to content

[Spec 2.0] references to JSON Schema constructs are not in linked doc #170

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

Closed
DavidBiesack opened this issue Oct 22, 2014 · 2 comments
Closed

Comments

@DavidBiesack
Copy link
Contributor

In spec 2.0, Schema Object refers to many of JSON schema constructs such as

"The following properties are taken directly from the JSON Schema definition and follow the same specifications:"

  • ...
  • multipleOf
  • maximum
  • exclusiveMaximum
  • minimum
  • exclusiveMinimum
  • ...
  • allOf

which are not found in the cited JSON Schema doc,
JSON Schema Specification Draft 4. This leaves authors with no guidance on how to define schemas in Swagger. Many of these constructs appeared in JSON Schema Specification Draft 3 but were dropped/moved/??? between 03 and 04

To me, it looks like the 04 draft is incomplete. Whatever the case, the Swagger spec should cite a complete reference.

Especially noteworth/needed is Add explanation about composition and inheritance in the new spec.

@webron
Copy link
Member

webron commented Oct 23, 2014

In the spec, I've linked to the general JSON Schema website. The JSON Schema definitions are split into three: core, validation and hyper-schema. The properties you're referring to are part of the JSON Schema Validation and they have a separate draft (also linked from that site).

@DavidBiesack
Copy link
Contributor Author

This fact is not obvious to the spec reader. (We may not be experts in navigating the JSON Schema spec landscape.) Please add a more obvious link. Since this section describes elements of JSON Schema Validation but says "JSON Schema definition", an explicit link will really help your readers, such as:

The following properties are taken directly from the JSON Schema Validation portion of the JSON Schema definition.

thanks!

@webron webron closed this as completed in 163f6e4 Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants