I’m using openapi in my spring boot project. When I generate a dto for my endpoints or as a $ref for other dtos, everything is generated well.
But for example dto ResponseGetDashboardForCollection and ResponseGetCardForCollection are not generated, because I don’t use them anywhere except service
<code>components:
schemas:
Collection:
type: object
properties:
authority_level:
type: string
description:
type: string
archived:
type: boolean
default: false
slug:
type: string
color:
type: string
name:
type: string
personal_owner_id:
type: integer
format: int32
type:
type: string
id:
type: integer
format: int32
entity_id:
type: string
location:
type: string
namespace:
type: string
created_at:
type: string
ResponseGetCollectionById:
type: object
properties:
total:
type: integer
data:
type: array
items:
type: object
nullable: true
models:
type: array
items:
type: string
default: [ "card", "collection", "dashboard", "dataset", "pulse" ]
limit:
type: integer
example: 25
offset:
type: integer
example: 0
ResponseGetDashboardForCollection:
type: object
properties:
description:
type: string
collection_position:
type: integer
format: int32
nullable: true
name:
type: string
id:
type: integer
format: int32
entity_id:
type: string
last_edit_info:
$ref: './last-edit-info.dto.yaml#/components/schemas/LastEditInfo'
model:
type: string
default: "dashboard"
ResponseGetCardForCollection:
type: object
properties:
description:
type: string
collection_position:
type: integer
format: int32
nullable: true
name:
type: string
id:
type: integer
format: int32
entity_id:
type: string
last_edit_info:
$ref: './last-edit-info.dto.yaml#/components/schemas/LastEditInfo'
model:
type: string
default: "card"
display:
type: string
maxLength: 254
collection_preview:
type: boolean
moderated_status:
type: string
nullable: true
fully_parametrized:
type: boolean
</code>
<code>components:
schemas:
Collection:
type: object
properties:
authority_level:
type: string
description:
type: string
archived:
type: boolean
default: false
slug:
type: string
color:
type: string
name:
type: string
personal_owner_id:
type: integer
format: int32
type:
type: string
id:
type: integer
format: int32
entity_id:
type: string
location:
type: string
namespace:
type: string
created_at:
type: string
ResponseGetCollectionById:
type: object
properties:
total:
type: integer
data:
type: array
items:
type: object
nullable: true
models:
type: array
items:
type: string
default: [ "card", "collection", "dashboard", "dataset", "pulse" ]
limit:
type: integer
example: 25
offset:
type: integer
example: 0
ResponseGetDashboardForCollection:
type: object
properties:
description:
type: string
collection_position:
type: integer
format: int32
nullable: true
name:
type: string
id:
type: integer
format: int32
entity_id:
type: string
last_edit_info:
$ref: './last-edit-info.dto.yaml#/components/schemas/LastEditInfo'
model:
type: string
default: "dashboard"
ResponseGetCardForCollection:
type: object
properties:
description:
type: string
collection_position:
type: integer
format: int32
nullable: true
name:
type: string
id:
type: integer
format: int32
entity_id:
type: string
last_edit_info:
$ref: './last-edit-info.dto.yaml#/components/schemas/LastEditInfo'
model:
type: string
default: "card"
display:
type: string
maxLength: 254
collection_preview:
type: boolean
moderated_status:
type: string
nullable: true
fully_parametrized:
type: boolean
</code>
components:
schemas:
Collection:
type: object
properties:
authority_level:
type: string
description:
type: string
archived:
type: boolean
default: false
slug:
type: string
color:
type: string
name:
type: string
personal_owner_id:
type: integer
format: int32
type:
type: string
id:
type: integer
format: int32
entity_id:
type: string
location:
type: string
namespace:
type: string
created_at:
type: string
ResponseGetCollectionById:
type: object
properties:
total:
type: integer
data:
type: array
items:
type: object
nullable: true
models:
type: array
items:
type: string
default: [ "card", "collection", "dashboard", "dataset", "pulse" ]
limit:
type: integer
example: 25
offset:
type: integer
example: 0
ResponseGetDashboardForCollection:
type: object
properties:
description:
type: string
collection_position:
type: integer
format: int32
nullable: true
name:
type: string
id:
type: integer
format: int32
entity_id:
type: string
last_edit_info:
$ref: './last-edit-info.dto.yaml#/components/schemas/LastEditInfo'
model:
type: string
default: "dashboard"
ResponseGetCardForCollection:
type: object
properties:
description:
type: string
collection_position:
type: integer
format: int32
nullable: true
name:
type: string
id:
type: integer
format: int32
entity_id:
type: string
last_edit_info:
$ref: './last-edit-info.dto.yaml#/components/schemas/LastEditInfo'
model:
type: string
default: "card"
display:
type: string
maxLength: 254
collection_preview:
type: boolean
moderated_status:
type: string
nullable: true
fully_parametrized:
type: boolean
I really don’t want to create a fake-endpoint. Is there some way to force swagger to generate these dtos?