We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
It's maybe related to #23, maybe not. I don't know. Here is the problem.
I have an endpoint:
paths: /bars: post: operationId: postBars description: Bar parameters: - name: body in: body required: true schema: $ref: '#/definitions/BarsRequest' responses: 200: description: Bar OK schema: $ref: '#/definitions/BarsResponse'
and definitions:
definitions: BarsRequest: type: object properties: state: type: string enum: ["a", "b", "c"] id: type: string query: type: string BarsResponse: type: object properties: state: type: string enum: ["a", "b", "c"] id: type: string bars: type: array items: $ref: '#/definitions/Bar'
With these definitions, the generated code is OK.
We can see that state and id are in common to BarsRequest and BarsResponse, so I created AbstractBar and used the allOf keyword:
state
id
BarsRequest
BarsResponse
AbstractBar
allOf
definitions: AbstractBar: type: object properties: state: type: string enum: ["a", "b", "c"] id: type: string BarsRequest: allOf: - $ref: '#/definitions/AbstractBar' - properties: query: type: string BarsResponse: allOf: - $ref: '#/definitions/AbstractBar' - properties: bars: type: array items: $ref: '#/definitions/Bar'
But wIth these new definitions, I have the following error:
The text was updated successfully, but these errors were encountered:
Fixed in 0.2
Sorry, something went wrong.
slavaschmidt
No branches or pull requests
Hi,
It's maybe related to #23, maybe not. I don't know.
Here is the problem.
I have an endpoint:
and definitions:
With these definitions, the generated code is OK.
We can see that
state
andid
are in common toBarsRequest
andBarsResponse
, so I createdAbstractBar
and used theallOf
keyword:But wIth these new definitions, I have the following error:
The text was updated successfully, but these errors were encountered: