Please check out the specification to see what subset of JSON schema is supported:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md> The spec does not support the JSON schema draft 4 100%. > On Jun 14, 2017, at 12:42 PM, 'Toe Dipper' via Swagger > <swagger-swaggersocket@googlegroups.com> wrote: > > From my understanding of JSON Schema, a schema document can (and should) > include a parameter for the version of its schema and an id that uniquely > identifies the definition, e.g. > > { > "$schema": "http://json-schema.org/draft-04/schema#", > "id": "mydef", > "type": "object", > "title": "My Schema Definition", > "description": "A bit more info here...", > "properties": {} > } > > However, if I include such a schema inside of a Swagger document, an error is > generated: > > Schema error at definitions.mydef > > additionalProperty "$schema" exists in when not allowed > > There is a similar error for including the "id" parameter. Is this error > correct? Are my JSON Schema definitions invalid if they include "$schema" > (see > https://spacetelescope.github.io/understanding-json-schema/reference/schema.html)? > Or is this a limitation of Swagger only implementing a subset of the JSON > Schema spec? > > Thanks for any clarifications! > > > Please NOTE: This electronic message, including any attachments, may include > privileged, confidential and/or inside information owned by Leaf Group. Any > distribution or use of this communication by anyone other than the intended > recipient(s) is strictly prohibited and may be unlawful. If you are not the > intended recipient, please notify the sender by replying to this message and > then delete it from your system. Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "Swagger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to swagger-swaggersocket+unsubscr...@googlegroups.com > <mailto:swagger-swaggersocket+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.