Comments (3)
Update: referencing paths also does not work:
paths:
/customer:
$ref: customer.yaml
I see "ValueError: unknown url type: 'customer.yaml'" from the tracelog.
Should it work or do I miss something?
from openapi-core.
You are missing spec_base_uri configuration to make referencing to work. It needs to be explicitly defined (version 0.19.3 will fix the problem).
import os
from openapi_core import Config, OpenAPI
SPEC_PATH = os.path.join(os.path.dirname(__file__), "api.yaml")
config = Config(spec_base_uri=f"file://{SPEC_PATH}")
OpenAPI.from_file_path(SPEC_PATH, config=config)
from openapi-core.
@p1c2u, thank you for your support. It indeed solved my issue!
from openapi-core.
Related Issues (20)
- [Bug]: No casting applied if type is object
- [Feature]: Auto-detect `base_uri` when using `OpenAPI.from_file_path`
- [Bug]: Mutual exclusion by use of `additionalProperties: false` across union types HOT 1
- Werkzeug validate_request: 'request' argument is not type of Request HOT 4
- [Bug]: Numerical strings are accepted as integers
- [Bug]: extra_format_unmarshallers get lost when instantiating V31RequestUnmarshaller HOT 4
- [Bug]: validation shouldn't fail when values contain array with null HOT 1
- Confusion with the Request.body type
- [Bug]: New DeprecationWarning with aiohttp 3.9.4
- [Bug]: `_validate_reference` cannot resolve $ref with a relative file path
- [Bug]: Does Not Support Binary Response Types HOT 3
- [Bug]: TestSearch.test_chars_valid test failure HOT 1
- [Bug]: Referencing other files causes resolver errors. HOT 1
- [Bug]: Maximum recursing depth exceeded HOT 1
- [Bug]: docs links sometimes have incorrect extension
- [Bug]: unmarshal cannot resolve $ref with a relative file path HOT 3
- [Bug]: `RequestUnmarshalResult` has wrong type for `body`
- [Feature]: Provide error details (validation text, path)
- [Feature]: Support for injecting custom input in custom openapi error response format
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-core.