Skip to content

[BUG] Resolver doesnt handle %7B -> { or %7D -> } #98

@dicolanl

Description

@dicolanl

Describe the bug
Openapi supports $ref to another file. when there is a path you need to encode / as ~1. {} needs to be %7B and %7D.

openapi_parser.errors.ParserError: OpenAPI file parsing error: Cannot resolve reference "file:///path/openapi-split/openapi-audit.yaml#/paths/~1audit~1export~1csv~1%7BexportId%7D": 'Object at "/paths" does not contain key: /audit/export/csv/%7BexportId%7D'

To Reproduce
Steps to reproduce the behavior:

  1. use a $ref for a path with {} encoded.
  2. use content = parse("/path/openapi.yaml")
  3. See error

Expected behavior
The parser should support the encoded paths and translate them when resolving the $ref.

System details (please complete the following information):

  • OS: MAC 15.5
  • OpenAPI / Swagger version 3.0.1
  • Python version Python 3.11.1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions