I\'ve been given some JSON files generated by a REST API with plenty of properties.
I\'ve created a Swagger 2.0 definition for this API and need to give it the corre
I know there are some tools to convert JSON to JSON schemas but, if I’m not mistaken, Swagger only has $refs to other objects definitions thus only has one level
You are mistaken. Swagger will respect any valid v4 JSON schema, as long as it only uses the supported subset.
The Schema Object...is based on the JSON Schema Specification Draft 4 and uses a predefined subset of it. On top of this subset, there are extensions provided by this specification to allow for more complete documentation.
It goes on to list the parts of JSON schema which are supported, and the bits which are not, and the bits which are extended by swagger.