You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would have prevented several mistakes previously made during schema design and spec version ups. Seems like there are several reasonable looking JSON Schema engines that could be used during CI.
Tricky bit is identifying which schema should be used to validate which example file, because our JSON formats do not contain embedded metadata to indicate that (and indeed that's recommended practice - instead, out-of-band mechanisms like Link response headers or IANA media-type parameters are usually needed).
We could rely on the RAML type indication but we'd have to make sure all files in examples/ were referenced from the RAML (or at least only validate the ones that were). Unused examples may be a mistake anyway...
The other obvious approach would rely on a .schemas.json file in each repo that simply mapped instances in examples/ to schemas in APIs/schemas, and error if the filenames didn't match up.
The text was updated successfully, but these errors were encountered:
I just managed to do some schema file renames that left a $ref or two pointing at nonexistent files. I suppose that a JSON Schema checker would have caught this.
Follow-up to AMWA-TV/is-template#3.
In addition to the basic JSON linting performed as part of the CI, it would great to:
This would have prevented several mistakes previously made during schema design and spec version ups. Seems like there are several reasonable looking JSON Schema engines that could be used during CI.
Tricky bit is identifying which schema should be used to validate which example file, because our JSON formats do not contain embedded metadata to indicate that (and indeed that's recommended practice - instead, out-of-band mechanisms like
Link
response headers or IANA media-type parameters are usually needed).We could rely on the RAML
type
indication but we'd have to make sure all files in examples/ were referenced from the RAML (or at least only validate the ones that were). Unused examples may be a mistake anyway...The other obvious approach would rely on a .schemas.json file in each repo that simply mapped instances in examples/ to schemas in APIs/schemas, and error if the filenames didn't match up.
The text was updated successfully, but these errors were encountered: