Closed skhwang closed 9 years ago
Swagger UI from Swagger.io recently added the support for the inline schema.
Here is the issue: https://github.com/swagger-api/swagger-ui/issues/1133
and here is the commit that fixed it: https://github.com/swagger-api/swagger-js/commit/91eff39298dc81c9a53074822bec4f8b86f6a519
I have noticed that the inline schema swagger node generates is missing type property for schema object.
The following inline schema displays "undefined" under Data Type column of Swagger UI's parameter view.
"parameters": [ { "name": "body", "in": "body", "required": false, "schema": { "properties": { "message": { "type": "string" } } } } ]
The following inline schema displays the model correctly under Data Type column.
"parameters": [ { "name": "body", "in": "body", "required": false, "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } ]
Based on the fact that the first example works fine in Swagger Editor (http://editor.swagger.io/) but not in Swagger UI, I am a little puzzled whether this type property should be there by the spec though.
type
Swagger UI from Swagger.io recently added the support for the inline schema.
Here is the issue: https://github.com/swagger-api/swagger-ui/issues/1133
and here is the commit that fixed it: https://github.com/swagger-api/swagger-js/commit/91eff39298dc81c9a53074822bec4f8b86f6a519
I have noticed that the inline schema swagger node generates is missing type property for schema object.
The following inline schema displays "undefined" under Data Type column of Swagger UI's parameter view.
The following inline schema displays the model correctly under Data Type column.
Based on the fact that the first example works fine in Swagger Editor (http://editor.swagger.io/) but not in Swagger UI, I am a little puzzled whether this
type
property should be there by the spec though.