Yes, this all works fine inside regular old Dropwizard; we use a custom
Bundle that, in brief and somewhat redacted, does:
public void run(final OurConfiguration configuration, final Environment
environment) throws IOException {
final OurSwaggerConfigWrapper config = configuration.getSwagger();
environment.jersey().register(ApiListingResource.class);
environment.jersey().register(SwaggerSerializers.class);
logger.info("swagger scanning packages '{}'",
config.config.getResourcePackage());
config.config.setScan(true);
}
Additionally, AssetsBundle serves up swagger-ui resources.
On Friday, November 1, 2019 at 3:32:08 PM UTC-4, Robert Di Falco wrote:
>
> 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 <[email protected]
> <javascript:>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/dropwizard-user/4a2c65ae-c52d-4575-9dc3-d71559a19659%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/dropwizard-user/4a2c65ae-c52d-4575-9dc3-d71559a19659%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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/3e22df89-0905-49dc-bb12-9bc004ba9540%40googlegroups.com.