OpenAPI 3.1 nullable compatibility
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- openapi, typescript
Research direction
Start in src/openapi/schemaAnalyzer.ts around the linked schema analyzer entry point and inspect how a schema whose type includes null is handled. Validate the analyzer with the provided integer-and-null example; done means it reports integer rather than string so components such as InputGuesser receive the correct input type.
Written by the indexing model from the issue text.
Description
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`
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from api-platform/admin
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
api-platform/admin#660 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
api-platform/admin#659 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
api-platform/admin#631 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
api-platform/admin#626 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
api-platform/admin#615 · 4 comments · 2 reactions ·
All issues in api-platform/admin
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·