section.models {- display: none;
}components: schemas: WeatherdataResponse: title: weatherdata response type: object properties: query: type: object properties: count: type: integer description: The number of items (rows) returned -- specifically, the number of sub-elements in the results property format: int32 example: 1 created: type: string description: The date and time the response was created example: 6/14/2017 2:30:14 PM lang: type: string description: The locale for the response example: en-US results: type: object properties: channel: type: object properties:
...components: schemas: WeatherdataResponse: title: weatherdata response type: object properties: query: $ref: '#/components/schemas/Query' Query: title: query type: object properties: count: type: integer description: The number of items (rows) returned -- specifically, the number of sub-elements in the results property format: int32 example: 1 created: type: string description: The date and time the response was created example: 6/14/2017 2:30:14 PM lang: type: string description: The locale for the response example: en-US results: $ref: '#/components/schemas/Results' Results: title: results type: object properties: channel: $ref: '#/components/schemas/Channel' Channel: title: channel type: object properties: units: description: Units for various aspects of the forecast. Note that the default is to use metric formats for the units (Celsius, kilometers, millibars, kilometers per hour). $ref: '#/components/schemas/Units'
...Hi Tom,
The display of the models at the bottom of Swagger-UI is a result of the merge between the previous versions of Swagger-UI and Swagger-Editor.
Swagger-Editor had a models view, and we’ve got numerous requests to have a similar view in Swagger-UI – this is the result.
Not surprising, we’re not getting opposite requests and we might add a configuration option to remove its rendering.
For the Editor though, it makes sense to have it as a live rendering of what you design.
As for inlining definition vs referencing then – I tend to recommend using references.
That allows for reusability, if needed, it’s easier to name the models, and it makes generated code cleaner.
From: <swagger-sw...@googlegroups.com> on behalf of "tom...@gmail.com" <tom...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, October 30, 2017 at 13:11
To: Swagger <swagger-sw...@googlegroups.com>
Subject: what's the purpose of the Models section in Swagger UI?
At the bottom of the Swagger UI display is a Models section. (For example, see http://petstore.swagger.io/ and scroll to the bottom.) I don't understand the purpose of this Models section. The Model information is already in the parameters or responses sections. Why do we need this repeated at the end?
I realize that I can easily hide this section with a style:
section.models {
1.
2. display: none;
}
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.