I am writing a reactive application using webflux with springdoc-openapi(v 1.4.3). Below is the router class
@Configuration
public class AppRouter {
@RouterOperation(path = "/app", produces = {
MediaType.APPLICATION_JSON_VALUE},
beanClass = Apphandler.class, method = RequestMethod.GET, beanMethod = "getApp",
operation = @Operation(operationId = "getApp", responses = {
@ApiResponse(responseCode = "200", description = "successful operation",
content = @Content(schema = @Schema(implementation = AppResponse.class)))
},
parameters = {
@Parameter(in = ParameterIn.HEADER, name = "Authorization ",required = true),
@Parameter(in = ParameterIn.QUERY, name = "id",required = true),
@Parameter(in = ParameterIn.QUERY, name = "idType")
}
))
@Bean
public RouterFunction<ServerResponse> route(Apphandler handler) {
return RouterFunctions.route(GET("/app"), handler::getApp);
}
}
Corresponding to above api definition below swagger response is coming

pom contains the below dependency for openapi
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-core</artifactId>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-ui</artifactId>
<version>1.4.3</version>
</dependency>
Below queries:
Q1. I have made id and authorization as required=true but even when I am running without providing them from swagger it is not giving any warning message. Ideally it should give some warning message. How to get that message
Q2. id value needs to follow some REGEX pattern like [a-zA-Z0-9]{5,15}.How to add this regex check. Also if I am providing id which does not follow this pattern should give some warning message? How to achieve it?
Q3. How to add enum for parameter?