-
-
Notifications
You must be signed in to change notification settings - Fork 197
Open
Labels
bugSomething isn't workingSomething isn't working
Description
π Bug Report
π Summary
An invalid OpenAPI schema is generated in specific situations.
- Typia Version: 10.1.0
- Expected behavior:
Typia should not generate an empty array for therequiredfield in OpenAPI schemas. According to the OpenAPI and JSON Schema specifications, an emptyrequiredarray is invalid. - Actual behavior:
Typia generates a schema that includes an emptyrequiredarray (required: []) in certain cases.
Details
According to the OpenAPI specification, an empty array for the required field is not allowed.
This can be verified in the following references:
-
OpenAPI Specification β Data Types
An empty list
required: []is not valid. If all properties are optional, do not specify therequiredkeyword. -
JSON Schema Draft-04
See thedefinitions.stringarraysection.
Both OpenAPI and its underlying JSON Schema Draft-04 specification disallow an empty required array.
However, Typia generates such an invalid schema in specific cases, for example:
This behavior is likely a bug.
Thank you.
Reactions are currently unavailable
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working