Skip to content

[BUG] Parser doesnt support Text/Json nor application/*+json as valid types for content within request body #67

@JohanpG

Description

@JohanpG

Describe the bug
When the Open API specification contains context with text/json or application/*+json these are not recognized as valid types.

To Reproduce
Steps to reproduce the behavior:

  1. Load a api specification containing any of these types in the request body content:
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/..."
                            }
                        },
                        "text/json": {
                            "schema": {
                                "$ref": "#/components/schemas/..."
                            }
                        },
                        "application/*+json": {
                            "schema": {
                                "$ref": "#/components/schemas/..."
                            }
                        }
                    }
                }
  1. Pass this file to the openapi parser
  2. See error

Expected behavior
These types should be valid tpes and the specification file should be validated.

System details (please complete the following information):

  • Windows 11
  • OpenAPI / Swagger version OpenAPI
  • Python version 3.9

Additional context
Removing these entries from the file allowed the validaation and loading of the ile into python.

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