-
Notifications
You must be signed in to change notification settings - Fork 208
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
Missing "encoding" field #1087
Comments
Yup, that is surely missing from the macro syntax as discussed here #811 (comment) #1055. |
I think we can verify that the the field is actually missing, from the generation side. I'll mark it as checked for the above todo list. |
jsoo1
added a commit
to jsoo1/utoipa
that referenced
this issue
Dec 13, 2024
Though only in a limited fashion - notable fields are still not implemented. Though this does let you do: ```rs request_body( content(...) encoding( ("field_name", ( content_type = "application/json", explode = true, allow_reserved = true, )) ) ) ``` Partially addresses juhaku#1087
jsoo1
added a commit
to jsoo1/utoipa
that referenced
this issue
Dec 13, 2024
Though only in a limited fashion - notable fields are still not implemented. Though this does let you do: ```rs request_body( content(...) encoding( ("field_name", ( content_type = "application/json", explode = true, allow_reserved = true, )) ) ) ``` Partially addresses juhaku#1087
jsoo1
added a commit
to jsoo1/utoipa
that referenced
this issue
Dec 17, 2024
Though only in a limited fashion - notable fields are still not implemented. Though this does let you do: ```rs request_body( content(...) encoding( ("field_name", ( content_type = "application/json", explode = true, allow_reserved = true, )) ) ) ``` Partially addresses juhaku#1087
jsoo1
added a commit
to jsoo1/utoipa
that referenced
this issue
Dec 17, 2024
Though only in a limited fashion - notable fields are still not implemented. Though this does let you do: ```rs request_body( content(...) encoding( ("field_name", ( content_type = "application/json", explode = true, allow_reserved = true, )) ) ) ``` Partially addresses juhaku#1087
juhaku
pushed a commit
to jsoo1/utoipa
that referenced
this issue
Dec 18, 2024
Though only in a limited fashion - notable fields are still not implemented. Though this does let you do: ```rs request_body( content(...) encoding( ("field_name", ( content_type = "application/json", explode = true, allow_reserved = true, )) ) ) ``` Partially addresses juhaku#1087
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I want to make sure the Swagger UI file dialog will limit the selectable file(s) to a specific extension (in this case
.glb
).Based on my discussion with ChatGPT and my read of the OAS spec, it should be done using the
encoding
object.How to reproduce
OAS Spec
In the OpenAPI Specification (OAS) 3.0, the encoding field is used to describe how a specific property of a multipart/form-data request body is encoded. Specifically, it is used for properties that are defined as file uploads. Here is the relevant section from the OpenAPI Specification (3.0.3):
Encoding Object Definition (OAS 3.0.3)
The encoding object is defined as follows:
Within the encoding object, you can use the contentType field to specify the MIME type for a particular property:
The key fields related to file uploads are:
- Example from OAS 3.0.3:
- When this is a multipart content-type, this property is used to describe the media type of a file part.
https://spec.openapis.org/oas/v3.0.3#encoding-object
To Do
The text was updated successfully, but these errors were encountered: