Openapi-core is a Python library that adds client-side and server-side support for the OpenAPI v3.0 and OpenAPI v3.1 specification.
BSD 3-Clause "New" or "Revised" License
299
stars
132
forks
source link
[Feature]: Auto-detect `base_uri` when using `OpenAPI.from_file_path` #801
Closed
jonathanberthias closed 3 months ago
Suggested Behavior
When I create an OpenAPI instance with a multi-file schema, I find myself writing:
This feels redundant as the implementation for
SchemaPath.from_file_path
also loads thebase_uri
, but that information is then lost: https://github.com/p1c2u/jsonschema-path/blob/f35bd22aa5a0b86fa4c194e47a29aa46908b0d10/jsonschema_path/paths.py#L86Why is this needed?
Ideally I would write the above as:
and the
spec_base_uri
would be correctly set.The
base_uri
is technically available but is private, e.g.:References
No response
Would you like to implement a feature?
None