Bug Report Checklist
Description
When using allOf and $ref, the array from the referenced object doesn't include type.
Elm
type alias Foo =
{ arrayOfStrings : List String
}
type alias Bar =
{ arrayOfStrings : List -- Should be `List String`
}
Golang
type Foo struct {
ArrayOfStrings []string `json:"arrayOfStrings"`
}
type Bar struct {
ArrayOfStrings Array `json:"arrayOfStrings"` // Should be `ArrayOfStrings []string`
}
openapi-generator version
openapi-generator-cli 7.5.0-SNAPSHOT
commit : f357be4
OpenAPI declaration file content or url
openapi: 3.1.0
info:
title: ""
version: ""
paths:
/user/getInfo:
get:
operationId: getUserInfo
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Bar'
description: |
OK
security:
- Session: []
x-accepts: application/json
components:
schemas:
Foo:
type: object
required:
- arrayOfStrings
properties:
arrayOfStrings:
type: array
items:
type: string
Bar:
allOf:
- $ref: '#/components/schemas/Foo'
Generation Details
Elm:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
--input-spec openapi.yaml \
--generator-name elm \
--output "foo"
Golang:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
--input-spec openapi.yaml \
--generator-name go \
--output "foo"
Steps to reproduce
Use the provided OpenAPI declaration file and generate code.
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
When using
allOfand$ref, the array from the referenced object doesn't include type.Elm
Golang
openapi-generator version
openapi-generator-cli 7.5.0-SNAPSHOT
commit : f357be4
OpenAPI declaration file content or url
Generation Details
Elm:
Golang:
Steps to reproduce
Use the provided OpenAPI declaration file and generate code.
Related issues/PRs
Suggest a fix