@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 dropwizard-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/4a2c65ae-c52d-4575-9dc3-d71559a19659%40googlegroups.com.
I have a related question. Anyone used the dropwizard swagger extension but had Swagger be on the same HTTPS and port as the rest end point?
On Fri, Nov 1, 2019 at 12:30 PM Steve Kradel <skr...@gmail.com> wrote:
@ApiParam(hidden = true) will tell Swagger/OpenAPI not to include that parameter in the spec.--
On Friday, November 1, 2019 at 1:57:12 PM UTC-4, Jason Novotny 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 dropwiz...@googlegroups.com.
Thanks Steve,
I'm trying to get Swager UI to be usable-- here's my basic problem:
1. I have an endpoint called /auth/login.
As you can see from the screenshot it works and it returns the token that is used in subsequent calls requiring authentication.
2. Given an API endpoint requiring authentication-- how can a Swagger UI user call this API? How to pass in the token from above?
Thanks, Jason
--
You received this message because you are subscribed to a topic in the Google Groups "dropwizard-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dropwizard-user/hH6R2544yaQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dropwizard-us...@googlegroups.com.
Thanks Steve,
I'm trying to get Swager UI to be usable-- here's my basic problem:
1. I have an endpoint called /auth/login.
As you can see from the screenshot it works and it returns the token that is used in subsequent calls requiring authentication.
2. Given an API endpoint requiring authentication-- how can a Swagger UI user call this API? How to pass in the token from above?
Thanks, Jason
On 11/1/19 12:30 PM, Steve Kradel wrote:
@ApiParam(hidden = true) will tell Swagger/OpenAPI not to include that parameter in the spec.--
On Friday, November 1, 2019 at 1:57:12 PM UTC-4, Jason Novotny 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 a topic in the Google Groups "dropwizard-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dropwizard-user/hH6R2544yaQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dropwiz...@googlegroups.com.
@SwaggerDefinition(securityDefinition = @SecurityDefinition(
basicAuthDefinitions = {@BasicAuthDefinition(key = "customer.basic", description = "Customer user/password")}))
@ApiOperation(value = "Some customer login", authorizations = @Authorization("customer.basic"))
@Auth @ApiParam(hidden = true) Customer customer
--
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 dropwizard-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/dd36bbef-d1af-4fcb-8b7f-7bdaa32283ac%40googlegroups.com.
Hi Leonardo,
Thanks for the tip. However the API call requiring authentication doesn't work after I invoke the login API-- I get error 401 that credentials are required to access this resource" because there appears to be no way to supply the token received from the login API call. Does anyone actually use Swagger or is it just for illustration purposes?
If anyone has any swagger page showing how to get a credential
and use it in subsequent calls, I'd be highly appreciative.
Thanks, Jason
@ApiParam(hidden = true)
--
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 dropwizard-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/71f8b7bb-c686-4d39-5134-1dc8d2f716e9%40gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "dropwizard-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dropwizard-user/hH6R2544yaQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dropwizard-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/CABPXi_r45JRk55Bjje2GXHQwajFfh%2B4k3AjsedXNFokZxQQFtA%40mail.gmail.com.
@SwaggerDefinition(securityDefinition = @SecurityDefinition(
apiKeyAuthDefinitions = {
@ApiKeyAuthDefinition(key = "jwt.auth", name = "Authorization", in = ApiKeyLocation.HEADER, description = "JWT")}))
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/CAJrD__-eS2j--Fqxyvnv5F2GBYmbdrsM2L09npoNm0cs7FZfWg%40mail.gmail.com.
Hi Leonardo,
Really appreciate the help you provided! That works :-)
Thanks, Jason
To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/CABPXi_phKw8__%3D1dmWuuqnh%3DeOAfReJiAOi%3Dw-CqHvAb%3DoC%3Dsw%40mail.gmail.com.