Describe the bug
I have a controller method with a similar signature:
@RestController
class MyController {
@GetMapping("api/foo")
fun getFoo(
...
@RequestHeader headers: org.springframework.http.HttpHeaders // access all headers
): Unit {
if(headers.range.isNotEmpty()) { ... }
}
}
The Spring Boot class HttpHeaders is interpreted as a regular DTO and is included in the openapi yaml output as such:
{
"openapi": "3.1.0",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
...
"components": {
"schemas": {
...
"HttpHeaders": {
"type": "object",
"properties": {
"empty": {
"type": "boolean"
},
"location": {
"type": "string",
"format": "uri"
},
"host": {
"type": "object",
"properties": {
"address": {
"type": "object",
"properties": {
"address": {
"type": "string",
"format": "byte"
},
...
To Reproduce
Steps to reproduce the behavior:
- What version of spring-boot you are using?
- What modules and versions of springdoc-openapi are you using?
- org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.3
Expected behavior
Unclear, the current behavior is most likely not preferable. Since the intention of the author of the controller cannot be inferred I would expect the parameter to be omitted from the openapi yml docs.
Describe the bug
I have a controller method with a similar signature:
The Spring Boot class HttpHeaders is interpreted as a regular DTO and is included in the openapi yaml output as such:
{ "openapi": "3.1.0", "info": { "title": "OpenAPI definition", "version": "v0" }, ... "components": { "schemas": { ... "HttpHeaders": { "type": "object", "properties": { "empty": { "type": "boolean" }, "location": { "type": "string", "format": "uri" }, "host": { "type": "object", "properties": { "address": { "type": "object", "properties": { "address": { "type": "string", "format": "byte" }, ...To Reproduce
Steps to reproduce the behavior:
Expected behavior
Unclear, the current behavior is most likely not preferable. Since the intention of the author of the controller cannot be inferred I would expect the parameter to be omitted from the openapi yml docs.