Add more test for OpenAPI Specification v3.1#2353
Conversation
JohnNiang
left a comment
There was a problem hiding this comment.
IMO, schema type is missing here.
| }, | ||
| "components": { | ||
| "schemas": { | ||
| "ExamplesResponse": { |
There was a problem hiding this comment.
| "ExamplesResponse": { | |
| "ExamplesResponse": { | |
| "type": "object", |
There was a problem hiding this comment.
@JohnNiang It seems that the current unit test also not include "type": "object"
There was a problem hiding this comment.
See here: https://spec.openapis.org/oas/v3.1.0#data-types
Data types in the OAS are based on the types supported by the JSON Schema Specification Draft 2020-12.
In JSON Schema Specification Draft 2020-12, "type" field is optional, so this is valid JSON schema.
And the api-gen is done by swagger-core. We can advise swagger-core to provide "type": "object".
|
@uc4w6c Can you review it? |
|
@xiaoxiangmoe I thought it might be better to combine it with the test code below. |
|
Thank you for your contribution to the project. |
Add more test for OpenAPI Specification v3.1
No description provided.