/public/swagger.json -> should return the swagger definition for resource under /public
/private/swagger.json -> should return the swagger definition for resource under /private
If you use ApiHelpController.getResource("/public") in one endpoint and ApiHelpController.getResource("/private") in the other, it won't work because there is a cache that keeps the Swagger definition and this cache is shared whatever the docRoot you use (/public or /private in this case).
The responsible code is the following in ApiListingCache:
Hello,
Imagine you have 2 endpoints:
/public/swagger.json
-> should return the swagger definition for resource under/public
/private/swagger.json
-> should return the swagger definition for resource under/private
If you use
ApiHelpController.getResource("/public")
in one endpoint andApiHelpController.getResource("/private")
in the other, it won't work because there is a cache that keeps the Swagger definition and this cache is shared whatever the docRoot you use (/public
or/private
in this case).The responsible code is the following in
ApiListingCache
:IMHO, we should have a different cache per
docRoot
value.