-
Notifications
You must be signed in to change notification settings - Fork 3
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
fixes for multiple documents #73
Comments
We're not testing multiple documents, so how this is to be handled might need to be changed in the interfaces. Since we call add_schema on the JSM object to add documents, we can't do any checking at add-document time to look for duplicate operation ids etc. we'll have to do the dupe check at runtime -- but that's ok, we can just iterate over all the known documents and query each one for the operation id (and we can't cache anything bcause a new document might be added at any time). |
This should be a public method, so that the user can always find the operation, given either the operationId or the http request method and the path_item_uri (these might not be available if only validating a response without an associated request). |
see also https://learn.openapis.org/specification/servers.html: "Be aware that if your OAD is split across multiple documents, each endpoint id assumed to be relative to the document in which it is described." -- this might change for v3.2, but in the meantime we need to be aware of the root URL of the document containing the path-item we are operating on. |
We also need to account for the possibility of having more than one "complete" openapi document. This has implications for searching |
When fixing the operation fetcher, see also https://metacpan.org/release/GETTY/Langertha-0.004/source/lib/Langertha/Role/OpenAPI.pm#L54-76 |
We should provide some additional helper methods to make it easier to work with multiple documents:
|
IF we are supporting multiple documents being collected together to create an OpenAPI description:
IF we are supporting only a single "entry" document, then:
see https://handrews.github.io/renderings/oas/deploy/oas/v3.1.1.html#resolving-implicit-connections |
A few places make assumptions that we are only ever working with one document. But actually a
$ref
can point to an entity in another document entirely.Most ref resolutions work properly, updating
$state
with the proper base uri, as we use JSON Schema semantics and its helper subs to work with references. However some issues remain:The text was updated successfully, but these errors were encountered: