-
Notifications
You must be signed in to change notification settings - Fork 266
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
[Bug]: @doc on bytes doesn't output OpenAPI description #3457
Comments
Hey, TypeSpec Team. Great work on building such a powerful tool for defining and modeling APIs. This is my first time contributing to an open-source project, and I am interested in helping with an issue I encountered in this repository. |
The documentation indicates that this behavior is intentional: Bytes does not support multipart/form-data. You can find more details here: OpenAPI Documentation. Should we modify the implementation? |
This may not be the right source of truth, but Swagger states:
This is consistent with the current TypeSpec implementation in that
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
required:
- file Multipart requests appear to be supported and encouraged https://swagger.io/docs/specification/v3_0/describing-request-body/file-upload/#:~:text=goes%20there%5D-,Upload%20via%20Multipart%20Requests,-To%20describe%20a But this is getting a little off topic of the original issue of the docs not working. |
fix #3457 (not exactly the same but this bascically resolves it with the multipart HttpPart way and we are removing the other.
fix #3457 (not exactly the same but this bascically resolves it with the multipart HttpPart way and we are removing the other.
Describe the bug
If a
@doc
decorator is used on abytes
field, the resulting OpenAPI spec does not include adescription
for that field.If
file
is changed tostring
, then adescription
appears as expected:Other types like
int16
,duration
, andunknown
also work as expected.Reproduction
Playground
Checklist
The text was updated successfully, but these errors were encountered: