5

I have a API which accepts One string, and One MAP as the input.

public ModelClass getMyApi(String inparm, Map<String, String> myValues)

I am wondering how can i capture MAP input in swagger document using @ApiImplicitParams, @ApiImplicitParam annotations.

I have tried with like this

 @ApiImplicitParam(name="myValues", value="Validation Values Map", required =
         true, dataType = "Map", paramType = "query")

But no luck.

Note: Am using Swagger-servlet Module.

Thanks.

3
  • Is the Map capturing the body or query params? Commented Jun 24, 2019 at 18:40
  • I found a relevant answer here but cannot comment on your question so pasting the link here stackoverflow.com/a/37258271/3759060 Commented Jan 20, 2020 at 7:04
  • Did you ever get this working? Commented Jan 25, 2022 at 11:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.