Ask a Question

Annotate a required queryParam

0 Kudos

Annotate a required queryParam

I am using swagger-core 2.1.9 with Jersey 3.x JAX-RS API and Jakarta namespace. I have a query that looks like


My method definition is:

public void getRecord(
                 @PathParam("featureGroup") String featureGroup, 
                 @Schema Jedis jedis, 
                 @Context HttpServletRequest request, 
                 @Context HttpServletResponse response)
            throws IOException, JedisException, JSONException {}

I want to annotate a required/notnull queryParam RecordIdentifierValueAsString as somewhere for this call. But when I do that, it says that local variable can not be annotated -

@NotNull @QueryParam("RecordIdentifierValueAsString") String recordIdentifier;

How can I annotate a query param if its not used as an argument to the method?

Welcome to the ReadyAPI Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Welcome to the Community
Sign Up Here