-
Notifications
You must be signed in to change notification settings - Fork 742
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
Extra (unnecessary?) type generated when processing url encoded body swagger #3897
Comments
I think is this the same issue as #3668 |
I don't think so. In that case, the schema is defined by the customer in the swagger. In this case, it's an artifact of the autorest transformations. |
well it is arguable. In OpenAPI3 there is a schema like that, when converting from swagger -> opeanpi3 it makes this schema and then it reflatten it. but if you are using openapi3 directly then this schema is defined in your specs |
I might be missing something. Can you refer to the openapi specification where it talks about explicitly defining schemas for urlencoded bodies? |
As far as I understand in OpenApi3. You have a single entry for the schema https://swagger.io/docs/specification/describing-request-body/ paths:
/survey:
post:
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
name: # <!--- form field name
type: string
fav_number: # <!--- form field name
type: integer
required:
- name
- email |
TIL. thank you |
Describe the bug
In this PR we found an extra type/class was generated:
Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema
This was a minor annoyance for .NET, as we mark it internal, but might be more annoying for other languages.
Swagger
Generated File
Expected behavior
@pakrym and I expected this type to be not added.
The text was updated successfully, but these errors were encountered: