-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Support validating Open API sub-schemas #452
Comments
|
Please, disregard my previous comment, I didn't understand the use case. Using response or parameter schemas that refer to components for validation would be an extremely useful feature. Right now, it is not possible, as each reference in such a schema does not know about its "root" document. I.e such a schema is not aware that it is part of a larger document (or set of documents as they could be refs in I am personally interested in this feature as it would be useful in Schemathesis Maybe there could be even a special mode for Open API specifically so it can handle |
Hi! Sorry for the long delay, but it is solvable now. See this comment. There are a few things to improve in the API and I'll keep track of it in #432. |
The spec that I am using is generated by the
utoipa
crate. The spec version is3.0.3
. The entire spec compiles just fine withJSONSchema::compile
. However, there are no errors caused when I use thevalidate
method using invalid data.I tried compiling the specific schema of the type I'm trying to validate, but that returns
invalid reference
error (the schema contains internal references such as#/components/schemas/SchemaName
). I also tried using thewith_document
method and naming the document with#
but to no avail. I presume this was only meant to be used for external references.Is this version of the spec not supported? Or am I doing something wrong here? Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: