>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.mydefadditionalProperty "$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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to