@Parameter 'required' property is always ignored
See original GitHub issueCode example:
@GetMapping(produces = [MediaType.APPLICATION_JSON_VALUE])
fun getOrders(
@RequestLimit @Parameter(name = "limit", required = false) limit: Int?,
@RequestOffset @Parameter(required = false) offset: Int,
@HeaderUserId userId: UUID,
@HeaderVisitorId visitorId: UUID
)
But always parameter marks as ‘required’ in ui and json schema
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Spring 2nd RequestParam always ignored [closed]
I have a HTTP Get Method, in which I'd like to pass two request parameters. While the first parameter is passed perfectly fine,...
Read more >Using Optional and Nullable Properties in API Requests
Learn how optional and nullable properties can be used flexibly in combinations in each parameter of your API requests made from a SDK....
Read more >Set Configuration Parameters for Model Hierarchies
Configuration parameter values can be different in top models and referenced models.
Read more >Parameters - Snowflake Documentation
All the parameters have default values, which can be set and then overridden at different levels depending on the parameter type (Account, Session,...
Read more >Analysis parameters - SonarQube Documentation
gitignore , will automatically be ignored by analysis too. Set this property to true to disable that feature. SCM exclusions are always disabled...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @little-fish,
For Pageable, are you declaring using ?
@ParameterObject Pageable pageable
@springdoc Its really correct behaviour. But why @Parameter annotation data ignored? As i understood, swagger-annotations used for implicit declaration or overriding default parser behaviour. If this concept ignored, the usefulness of this library tends to zero. As you see in my code snippet, used my own parameter annotations. This an important case to override default request parameter handling.