Skip to content

[Feature] add support for OpenAPI 3.1 #85

@asdfasdfasdfasdfasasdf

Description

@asdfasdfasdfasdfasasdf

tmp.yaml.txt
Describe the bug
The YAML file we use fails to be parsed. I believe have tracked it down to:
type:
- string

The error is shown as:
File "/home/***/.local/lib/python3.10/site-packages/openapi_parser/builders/schema.py", line 135, in create
raise ParserError(f"Invalid schema type '{schema_type}'") from None
openapi_parser.errors.ParserError: Invalid schema type '['string']'

I'm quite confident that the YAML syntax is correct. We use it just fine and Swagger does not complain.

To Reproduce
Use attached YAML file and type:
python3
from openapi_parser import parse
all_parse = parse('tmp.yaml')

Expected behavior
No error parsing the file.

System details (please complete the following information):

  • OS: Kubuntu 22.04
  • OpenAPI / Swagger version 3.1.0
  • Python version 3.10.12

Additional context

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Projects

Status
In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions