hapi-server / data-specification-schema

JSON Schema for HAPI
MIT License
1 stars 0 forks source link

what combine script must do #7

Closed jbfaden closed 5 months ago

jbfaden commented 10 months ago
rweigel commented 10 months ago

It seems like there should be a simple fix for getting a single schema file working on jsonschema.net (if so, I would also not have to extract a subschema in my code as I do now; I expect the same to be true for other languages).

Then the entire need for splitting files is gone and I would not need an extra step in my code that extracts a subschema (which I should have recognized earlier).

Here is an example of four sub schemas in a single file https://json.schemastore.org/jsbeautifyrc.json; I think we would need an oneOf at the top level instead of allOf.

Note all schemas are in a single file in all of the examples at https://json.schemastore.org/ and jsonschema.net, even the complex ones with references.

jbfaden commented 10 months ago

I guess if it works in jsonschema.net then it would probably work in editors like Visual Studio Code. That said I would rather have separate schemas anyway. The schema is the "type of" declaration, and to declare a response is a "info" is more precise than saying it is "something a HAPI server responds with".

rweigel commented 5 months ago

Closing b/c should be a part of issue #3, not new issue.