Closed
Description
Describe the bug
After adding springdoc.show-actuator=true
, I can see all the actuator endpoints 👍 but I cannot see the Request Body field for the @WriteOperation
endpoints (for example https://github.com/spring-projects/spring-boot/blob/47516b50c39bd6ea924a1f6720ce6d4a71088651/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/logging/LoggersEndpoint.java#L99).
In the following class it seems that only parameters are managed :
To Reproduce
Steps to reproduce the behavior:
- What version of spring-boot you are using? Tried with 2.5.10 and 2.6.4
- What modules and versions of springdoc-openapi are you using? Tried with 1.6.2 and 1.6.6
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webmvc-core</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
</dependency>
- What is the actual and the expected result using OpenAPI Description (yml or json)?
"post": {
"tags": ["Actuator"],
"summary": "Actuator web endpoint 'loggers-name'",
"operationId": "loggers-name_7",
"parameters": [{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {...},
}
Expected behavior
- A clear and concise description of what you expected to happen.
We expect to have the Request Body field in case of@WriteOperation
if it is possible as there is not@RequestBody
annotation. - What is the expected result using OpenAPI Description (yml or json)?
Something like this for the LoggersEndpoint :
"post": {
"tags": ["Actuator"],
"summary": "Actuator web endpoint 'loggers-name'",
"operationId": "loggers-name_7",
"parameters": [{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"configuredLevel": {
"type": "string",
"required": true
}
}
}
}
},
"required": true
},
"responses": {...},
}