-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fine-grained JSON document structure control #101
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 92.73% 92.75% +0.01%
==========================================
Files 23 23
Lines 2052 2056 +4
Branches 435 435
==========================================
+ Hits 1903 1907 +4
Misses 97 97
Partials 52 52
☔ View full report in Codecov by Sentry. |
It would also be necessary to make This is done as part of PR #82, but could be split out to accompany this PR (which I guess would make it a 0.11.0 as it would be a public interface change, albeit a backwards compatible one) |
OK, playing with all of this more, I've essentially had to re-implement #82 and #87. And would probably also need #83 due to weirdness between OAS 3.1 schema So I think when you have time to look over all of this for a 0.11.0, it would be good to solve all of these related challenges. In the meantime, I'll work off of my fork and keep experimenting to see what works. |
My OpenAPI project no longer needs this specific change, although I still think something like this is probably worthwhile in the context of extensibility in general. If such extensibility is desired. I find myself using the |
cece395
to
523750a
Compare
Per comment in #108, I'm moving this back out of draft. The alternate way I have handled this in |
This factors the instantiation of list items and object values into their own methods to allow more flexible determination of whether a sub-structure is a JSON Schema or not. This will allow using jschon with formats like OpenAPI that embed schemas in complex pattern of locations, without the root object being a schema.
Left off the previous commit by accident.
fc01a5e
to
416690d
Compare
Fixes #99, enabling possibe OpenAPI 3.x support as an extension.
This factors the instantiation of list items and object values into their own methods to allow more flexible determination of whether a sub-structure is a JSON Schema or not. This will allow using jschon with formats like OpenAPI that embed schemas in complex pattern of locations, without the root object being a schema.
@marksparkza while I'd love to get this into a 0.10.3, I realize it potentially has more substantial implications by defining an extension interface. If this approach feels like it needs more work, I would be happy for this to be bumped to a future release if it means #100 can go out in an earlier 0.10.3 release, as that one is a bugfix that will have immediate impact.