public class SwaggerRestApplicationInterceptor extends Object
SwaggerRestApplicationInterceptor
gets applied to JAX-RS Application subtypes and ensures that the Swagger
resources get included as part of the Application deployment.Constructor and Description |
---|
SwaggerRestApplicationInterceptor() |
Modifier and Type | Method and Description |
---|---|
Object |
aroundInvoke(InvocationContext context)
As per the JAX-RS specification, if a deployment sub-classes JAX-RS Application and returns a non-empty collection for
either
Application#getClasses() or Application#getSingletons() , then, only the references mentioned in
those collections should be used as REST resources. |
public Object aroundInvoke(InvocationContext context) throws Exception
Application#getClasses()
or Application#getSingletons()
, then, only the references mentioned in
those collections should be used as REST resources. This poses a slight problem when the developers expect to see
their Swagger resources, but don't see it (due to specification conformance). This method takes care of adding the
relevant resources (if required).Exception
Copyright © 2018 JBoss by Red Hat. All rights reserved.