-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Description
Array type alias produces empty struct, it only produces working code if I inline the schema definition to the response block.
openapi-generator version
openapi: 3.0.0
OpenAPI declaration file content or url
....
responses:
'200':
description: Secrets listed
content:
application/json:
schema:
$ref: '#/components/schemas/SecretsListResponse'
...
SecretsListResponse:
type: array
items:
$ref: '#/components/schemas/SecretsListItem'
...
SecretsListItem:
type: object
properties:
id:
type: string
example: "62bc3c75-91fb-4670-bad4-24b401a9deac"
##### Command line used for generation
`docker run --rm -v $PWD:/local openapitools/openapi-generator-cli generate \
--additional-properties packageName=client \
-i /local/docs/openapi/pipeline.yaml \
-g go \
-o /local/clientSteps to reproduce
Related issues/PRs
#391 maybe.
Suggest a fix/enhancement
Instead of this code:
package client
type SecretsListResponse struct {
}I think this should be produced:
package client
type SecretsListResponse []SecretsListItemReactions are currently unavailable