Is there a way to make Restlet Swagger extension limit the API it shows?
There are paths in the API we have that should not be explosed (just yet), what is the strategy to make sure that at least only specific org.restlet.routing.Router
will be exposed? As we have many Router
s in the Application.
This isn't possible out of the box. The easier way to do that is IMO to patch the extension
org.restlet.extension.swagger
:Update the method
getSwagger
of the classSwaggerSpecificationRestlet
to allow to update introspected definition filtering, as described below:In your application, configure this class by overriding the method
getSwaggerSpecificationRestlet
:Here is a sample of the method
filterDefinition
:Hope it helps you, Thierry