An in body parameter with discriminator does not show up in the method signature
See original GitHub issueI have an API with the following parameter in the swagger spec -
{
"name": "resultQuery",
"in": "body",
"description": "Query to retrieve results based on the query type.",
"required": true,
"schema": {
"$ref": "#/definitions/ResultQuery"
}
This is the schema for the object -
{
"ResultQuery": {
"description": "Query for a particular result.",
"required": ["queryType"],
"type": "object",
"properties": {
"queryType": {
"description": "Query type which specifies which result needs to be queried.",
"enum": ["Enum1", "Enum2"],
"type": "string",
"x-ms-enum": {
"name": "ResultQueryType",
"modelAsString": false
}
}
},
"discriminator": "queryType"
}
}
When I generate the client DLL for this spec, the method signature does not have the ResultQuery. However, It works when I remove the discriminator attribute from the schema of “ResultQuery” but then the method does not support polymorphism.
Any workarounds for this?
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (12 by maintainers)
Top Results From Across the Web
Handling exception at a controller method signature
When I use the annotation @RequestBody(required = false) , the request body is mapped to a null object.
Read more >Amazon API Gateway important notes
API Gateway does not support sharing a custom domain name across REST and WebSocket ... The discriminator parameter is not supported in any...
Read more >Customize what happens in Model.fit | TensorFlow Core
Let's start from a simple example: ... The input argument data is what gets passed to fit as training data: ... In the...
Read more >OpenAPI Specification v3.1.0 | Introduction, Definitions, & More
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs.
Read more >HL7.FHIR.UV.SHORTHAND\Language Reference - FHIR v4.0.1
It is up to implementations to define the association between FSH items and FSH projects. The order of items, regardless of format, SHALL...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, #1726 should have fixed it. (Fixed it in the test I created 😃 )
@fearthecowboy Sorry for responding so late. Yes, the issue seems to be have been fixed. Thanks!