New issue
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
Request body is mapped to object instead of DTO type #4093
Comments
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've tried to generate controller code (using
openApiToCSharpController
) from following OpenAPI specification. But it seems, that thePOST
request body is mapped to an object parameter each time. And not using the referenced schema definition's type.Hint: Without the
$ref: "#/components/requestBodies/Room"
(using theRoom
schema directly) theRoom
type is used as expected.It generates:
Are there any settings affecting the request body mapping?
Thanks in advance for any further information.
Generated controller base class with create method:
The source OpenAPI specification used for the test:
The text was updated successfully, but these errors were encountered: