You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Explicitly specifying request body properties by putting @Content(schemaProperties=...) in a method-level @RequestBody doesn't cause the properties to be included in the generated schema.
To Reproduce
Spring Boot 2.6.7
Springdoc-openapi 1.6.8
Modules: kotlin, security, ui (and their transitive dependencies)
Additional context
I'm not using a FilePart or a RequestPart parameter here because the uploaded files are machine-generated output and can be multiple gigabytes in size. Spring (or Jetty) reads the entire request body from the client before calling the controller method if you declare one of those parameters. Instead I'm using Apache FileUpload to stream the contents of the file into my application code as it arrives from the client, but I want the API schema to be identical to what it would look like if I were using FilePart.
The text was updated successfully, but these errors were encountered:
Came here for the same thing, only that my media type is application/x-www-form-urlencoded.
I'm basically trying to migrate from JAX-WS to Spring and need to translate a @FormParam annotation. While I don't care that @RequestParam also accepts query parameters, I would like it to be a form parameter in the OpenAPI doc and Swagger UI.
It seems unnecessarily verbose, but this is how I'm trying to replace it:
Describe the bug
Explicitly specifying request body properties by putting
@Content(schemaProperties=...)
in a method-level@RequestBody
doesn't cause the properties to be included in the generated schema.To Reproduce
Expected behavior
The above code should result in the following (leaving off the responses section for brevity):
The actual output is missing the
properties
section of the schema:Additional context
I'm not using a
FilePart
or aRequestPart
parameter here because the uploaded files are machine-generated output and can be multiple gigabytes in size. Spring (or Jetty) reads the entire request body from the client before calling the controller method if you declare one of those parameters. Instead I'm using Apache FileUpload to stream the contents of the file into my application code as it arrives from the client, but I want the API schema to be identical to what it would look like if I were usingFilePart
.The text was updated successfully, but these errors were encountered: