Skip to content

OpenAPI 3.1 nullable compatibility #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lusimeon opened this issue Apr 24, 2025 · 0 comments
Open

OpenAPI 3.1 nullable compatibility #616

lusimeon opened this issue Apr 24, 2025 · 0 comments

Comments

@lusimeon
Copy link

lusimeon commented Apr 24, 2025

Description
OpenAPI 3.1 specification defines Schemas properties nullable types as described below to follow JSON Schema 4.

API Platform Admin openAPI schema Analyzer does not process nullable type and fallback to string type instead of extracting type from the non-nullable type. This introduces wrong input type when using Component like InputGuesser for example.

Schema Analyzer should take into account nullable types.

Example

# OpenAPI specification example
[…]
properties:
    myProperty:
        type:
            - integer
            - null

# Before fix
schemaAnalyze field type is `string`

# After fix
schemaAnalyzer field type is `integer`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant