feat: Validate with JSON pointer#1075
feat: Validate with JSON pointer#1075yahelnachum wants to merge 1 commit intoStranger6667:masterfrom
Conversation
|
Sorry for the delay! I am going to review it next week - need to rework some parts of the registry-related workflows first. |
|
No problem, let me know what you think! |
|
@Stranger6667 have you had a chance to look at this? Thanks again for your time! |
|
@yahelnachum Sorry for the delay! My main concern is that the Right now there are new error paths (when For example, it could be a new "build"-like method on let map = jsonschema::options().build_map(&schema)?;
let user_validator = map["/components/schemas/User"]; # or map.get("...")
user_validator.is_valid(...);I think this way, the API expansion scope is smaller and the feature itself is harder to misuse |
Some documents, such as OpenAPI, do not contain a referenced root schema, but do contain multiple schemas that users would like to validate against. The current solution to this is to create a resource of this document and point into the resource with a small additional root schema. Instead, users should be able to compile the document and at a later time specify a subschema, using a JSON pointer, at execution time.
Summary of code changes: