Skip to content

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

Closed

Description

@DavidBiesack

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.

Activity

  1. webron commented on Oct 23, 2014

    @webron
    Member

    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).

  2. DavidBiesack commented on Oct 23, 2014

    @DavidBiesack
    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!

  3. added a commit that references this issue on Mar 4, 2015
    163f6e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions