You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
I created a large and structured definition with separate files for different components.
When executing swagger-cli all of the references are somewhat flattened so that they are not available as single reused components anymore but just plain copies of the definition.
This means that if I have a component like this and reuse it several times inside my definition the API user can by reading the definition see immediately that it is actually the same object. However, when I use swagger-cli that information is lost completely and the user might find out "accidentally" that I am returning the same structure with different API calls.
OrderPosition:
type: object
description: The order position object as returned from the API
properties:
id:
type: integer
readOnly: true
example: 23454
quantity:
type: integer
example: 10
productId:
type: integer
example: 3847
tsCreated:
type: string
readOnly: true
description: Create timestamp in ISO8601 format
example: "2021-09-10T12:19:53+00:00"
tsUpdated:
type: string
readOnly: true
description: Update timestamp in ISO8601 format
example: "2021-09-10T12:19:53+00:00"
My expectation would be that such definitions are simply copied to the components object and referenced instead of copying the contents and losing the big picture.
The text was updated successfully, but these errors were encountered:
I created a large and structured definition with separate files for different components.
When executing swagger-cli all of the references are somewhat flattened so that they are not available as single reused components anymore but just plain copies of the definition.
This means that if I have a component like this and reuse it several times inside my definition the API user can by reading the definition see immediately that it is actually the same object. However, when I use swagger-cli that information is lost completely and the user might find out "accidentally" that I am returning the same structure with different API calls.
My expectation would be that such definitions are simply copied to the
components
object and referenced instead of copying the contents and losing the big picture.The text was updated successfully, but these errors were encountered: