org.wildfly.swarm.swagger.deployment

## Class SwaggerRestApplicationInterceptor

- java.lang.Object
- - org.wildfly.swarm.swagger.deployment.SwaggerRestApplicationInterceptor

-     public class SwaggerRestApplicationInterceptor
      extends Object

  The `SwaggerRestApplicationInterceptor` gets applied to JAX-RS Application subtypes and ensures that the Swagger resources get included as part of the Application deployment.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwaggerRestApplicationInterceptor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SwaggerRestApplicationInterceptor

          public SwaggerRestApplicationInterceptor()

  - ### Method Detail

    - #### aroundInvoke

          public Object aroundInvoke(InvocationContext context)
                              throws Exception

      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. 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).
      Throws:
        `Exception`

Copyright © 2018 JBoss by Red Hat. All rights reserved.