Thanks Ron for clearing the doubts. Furthermore, what if I am having the 
spec locally inside the webapps folder? How do I point it to the index.html 
of Swagger-UI? And also I didn't get CORS will not be needed if my app and 
Swagger UI are running in the same application. Could you please provide an 
example?
On Wednesday, February 21, 2018 at 11:48:04 PM UTC+5:30, Ron wrote:
>
> It should work, yes. Pretty much like you’d serve any other static content.
>
> You’d need to modify the index.html and point it the the URL where your 
> API definition is served.
>
> You do not need to enable CORS if the app and swagger-ui run in the same 
> application.
>
>  
>
>  
>
>  
>
> *From: *<[email protected] <javascript:>> on behalf of Sayak 
> Paul <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Tuesday, February 20, 2018 at 23:12
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *Running Swagger UI on Tomcat
>
>  
>
> Hello. I have downloaded the zip version of Swagger-UI from Git. Now I 
> want to host it from Tomcat locally with my customized .json spec. If I 
> simply put the whole Swagger-UI folder in the webapps folder of Tomcat, 
> will it work? And how do I add my own spec into it? Let's say my APIs are 
> running in the same Tomcat Server itslef. 
>
> What are steps that are to be taken care of? How do I do the CORS in this 
> case? Will adding the following do the work? 
>
>
> <filter>
>
>   <filter-name>CorsFilter</filter-name>
>
>   <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
>
> </filter>
>
> <filter-mapping>
>
>   <filter-name>CorsFilter</filter-name>
>
>   <url-pattern>/*</url-pattern>
>
> </filter-mapping>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to