I use this in the class level:
@SwaggerDefinition(securityDefinition = @SecurityDefinition(
basicAuthDefinitions = {@BasicAuthDefinition(key =
"customer.basic", description = "Customer user/password")}))
this in the method:
@ApiOperation(value = "Some customer login", authorizations =
@Authorization("customer.basic"))
and this for the param:
@Auth @ApiParam(hidden = true) Customer customer
On Fri, Nov 1, 2019 at 10:57 AM Jason Novotny <[email protected]>
wrote:
> Hi,
>
> Given an API requiring authentciation like so:
>
> @Path("/updateUser")
> @POST
> public String updateUser(@Auth UserPrincipal userPrincipal, UserRequest user)
>
> How do I add the appropriate annotations in Swagger so that a client can test
> the API in the Swagger UI?
>
> What I currently get is the attached screenshot
>
> Thanks, Jason
>
> --
> You received this message because you are subscribed to the Google Groups
> "dropwizard-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dropwizard-user/dd36bbef-d1af-4fcb-8b7f-7bdaa32283ac%40googlegroups.com
> <https://groups.google.com/d/msgid/dropwizard-user/dd36bbef-d1af-4fcb-8b7f-7bdaa32283ac%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
-----------------------------------------------------------
Leonardo Contreras Alfonso
Bogotá D.C. - Colombia
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dropwizard-user/CABPXi_oUuqG4Q2DQFU7tiVqJL2J%2BTQ-94yF6oJ52p1W7T7AAwg%40mail.gmail.com.