OpenAPILoadError
The Cause
Section titled “The Cause”An error occurred while loading, parsing, or dereferencing the OpenAPI document. This can happen for several reasons:
External References
Section titled “External References”Currently, Thymian only supports OpenAPI documents without external $ref references. If your document uses external references, they must be resolved before loading.
# ❌ External reference - not supportedcomponents: schemas: User: $ref: './schemas/user.yaml'
# ✅ Inline definition - supportedcomponents: schemas: User: type: object properties: name: type: stringInvalid OpenAPI Document
Section titled “Invalid OpenAPI Document”The document may not be valid according to the OpenAPI 3.1 specification.
File System Issues
Section titled “File System Issues”- The file path may be incorrect
- The file may not be readable
- The file may not be valid YAML/JSON
The Solution
Section titled “The Solution”You can validate your document using:
thymian openapi:validate path/to/your/openapi.yamlIf you’re using external references, consider using a tool like swagger-cli to bundle your OpenAPI document into a single file before using it with Thymian.