Re: Running Swagger UI on Tomcat

2018-02-22 Thread Sayak Paul
Thanks for the insights. I will get back to you if I get stuck in between.

On Thursday, February 22, 2018 at 8:21:10 PM UTC+5:30, Ron wrote:
>
> The same way you’d construct the url to access swagger-ui within your app.
>
>  
>
>  
>
>  
>
> *From: *> on behalf of Sayak 
> Paul >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Thursday, February 22, 2018 at 07:49
> *To: *Swagger >
> *Subject: *Re: Running Swagger UI on Tomcat
>
>  
>
> Okay. And what about the URL of the yaml/json spec? How do I construct 
> that?
>
> On Thursday, February 22, 2018 at 8:15:56 PM UTC+5:30, Ron wrote: 
>
> Those questions are a bit out of scope. You’d put the files wherever you’d 
> put any other static content – that’s a Java question, not a Swagger one. 
> As long as they’re in the same application, you won’t need CORS.
>
>  
>
>  
>
>  
>
> *From: * on behalf of Sayak Paul <
> spsay...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Thursday, February 22, 2018 at 07:43
> *To: *Swagger 
> *Subject: *Re: Running Swagger UI on Tomcat
>
>  
>
> So how do I construct the URL of the spec file? And suppose the war of my 
> application is present within the webapp folder of Tomcat, where do I have 
> put the Swagger UI so that CORS is not needed?
>
> On Thursday, February 22, 2018 at 8:08:06 PM UTC+5:30, Ron wrote: 
>
> Even if you have the spec in the webapp folder, it’d be hosted just like 
> swagger-ui and have a URL – feed that to it.
>
> CORS is only needed if the host and port of the javascript and the target 
> calls are not the same, by definition.
>
>  
>
>  
>
>  
>
> *From: * on behalf of Sayak Paul <
> spsay...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Wednesday, February 21, 2018 at 20:57
> *To: *Swagger 
> *Subject: *Re: Running Swagger UI on Tomcat
>
>  
>
> 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: * on behalf of Sayak Paul <
> spsay...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Tuesday, February 20, 2018 at 23:12
> *To: *Swagger 
> *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? 
>
>
> 
>
>   CorsFilter
>
>   org.apache.catalina.filters.CorsFilter
>
> 
>
> 
>
>   CorsFilter
>
>   /*
>
> 
>
> -- 
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com .
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com .
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Swagger UI on Tomcat

2018-02-22 Thread Ron Ratovsky
The same way you’d construct the url to access swagger-ui within your app.

 

 

 

From:  on behalf of Sayak Paul 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, February 22, 2018 at 07:49
To: Swagger 
Subject: Re: Running Swagger UI on Tomcat

 

Okay. And what about the URL of the yaml/json spec? How do I construct that?

On Thursday, February 22, 2018 at 8:15:56 PM UTC+5:30, Ron wrote: 

Those questions are a bit out of scope. You’d put the files wherever you’d put 
any other static content – that’s a Java question, not a Swagger one. As long 
as they’re in the same application, you won’t need CORS.

 

 

 

From:  on behalf of Sayak Paul 

Reply-To: "swagger-sw...@googlegroups.com" 
Date: Thursday, February 22, 2018 at 07:43
To: Swagger 
Subject: Re: Running Swagger UI on Tomcat

 

So how do I construct the URL of the spec file? And suppose the war of my 
application is present within the webapp folder of Tomcat, where do I have put 
the Swagger UI so that CORS is not needed?

On Thursday, February 22, 2018 at 8:08:06 PM UTC+5:30, Ron wrote: 

Even if you have the spec in the webapp folder, it’d be hosted just like 
swagger-ui and have a URL – feed that to it.

CORS is only needed if the host and port of the javascript and the target calls 
are not the same, by definition.

 

 

 

From:  on behalf of Sayak Paul 

Reply-To: "swagger-sw...@googlegroups.com" 
Date: Wednesday, February 21, 2018 at 20:57
To: Swagger 
Subject: Re: Running Swagger UI on Tomcat

 

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:  on behalf of Sayak Paul 

Reply-To: "swagger-sw...@googlegroups.com" 
Date: Tuesday, February 20, 2018 at 23:12
To: Swagger 
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? 


  CorsFilter
  org.apache.catalina.filters.CorsFilter


  CorsFilter
  /*

-- 
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Swagger UI on Tomcat

2018-02-22 Thread Sayak Paul
Okay. And what about the URL of the yaml/json spec? How do I construct that?

On Thursday, February 22, 2018 at 8:15:56 PM UTC+5:30, Ron wrote:
>
> Those questions are a bit out of scope. You’d put the files wherever you’d 
> put any other static content – that’s a Java question, not a Swagger one. 
> As long as they’re in the same application, you won’t need CORS.
>
>  
>
>  
>
>  
>
> *From: *> on behalf of Sayak 
> Paul >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Thursday, February 22, 2018 at 07:43
> *To: *Swagger >
> *Subject: *Re: Running Swagger UI on Tomcat
>
>  
>
> So how do I construct the URL of the spec file? And suppose the war of my 
> application is present within the webapp folder of Tomcat, where do I have 
> put the Swagger UI so that CORS is not needed?
>
> On Thursday, February 22, 2018 at 8:08:06 PM UTC+5:30, Ron wrote: 
>
> Even if you have the spec in the webapp folder, it’d be hosted just like 
> swagger-ui and have a URL – feed that to it.
>
> CORS is only needed if the host and port of the javascript and the target 
> calls are not the same, by definition.
>
>  
>
>  
>
>  
>
> *From: * on behalf of Sayak Paul <
> spsay...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Wednesday, February 21, 2018 at 20:57
> *To: *Swagger 
> *Subject: *Re: Running Swagger UI on Tomcat
>
>  
>
> 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: * on behalf of Sayak Paul <
> spsay...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Tuesday, February 20, 2018 at 23:12
> *To: *Swagger 
> *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? 
>
>
> 
>
>   CorsFilter
>
>   org.apache.catalina.filters.CorsFilter
>
> 
>
> 
>
>   CorsFilter
>
>   /*
>
> 
>
> -- 
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com .
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com .
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Swagger UI on Tomcat

2018-02-22 Thread Ron Ratovsky
Those questions are a bit out of scope. You’d put the files wherever you’d put 
any other static content – that’s a Java question, not a Swagger one. As long 
as they’re in the same application, you won’t need CORS.

 

 

 

From:  on behalf of Sayak Paul 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Thursday, February 22, 2018 at 07:43
To: Swagger 
Subject: Re: Running Swagger UI on Tomcat

 

So how do I construct the URL of the spec file? And suppose the war of my 
application is present within the webapp folder of Tomcat, where do I have put 
the Swagger UI so that CORS is not needed?

On Thursday, February 22, 2018 at 8:08:06 PM UTC+5:30, Ron wrote: 

Even if you have the spec in the webapp folder, it’d be hosted just like 
swagger-ui and have a URL – feed that to it.

CORS is only needed if the host and port of the javascript and the target calls 
are not the same, by definition.

 

 

 

From:  on behalf of Sayak Paul 

Reply-To: "swagger-sw...@googlegroups.com" 
Date: Wednesday, February 21, 2018 at 20:57
To: Swagger 
Subject: Re: Running Swagger UI on Tomcat

 

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:  on behalf of Sayak Paul 

Reply-To: "swagger-sw...@googlegroups.com" 
Date: Tuesday, February 20, 2018 at 23:12
To: Swagger 
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? 


  CorsFilter
  org.apache.catalina.filters.CorsFilter


  CorsFilter
  /*

-- 
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Swagger UI on Tomcat

2018-02-22 Thread Sayak Paul
So how do I construct the URL of the spec file? And suppose the war of my 
application is present within the webapp folder of Tomcat, where do I have 
put the Swagger UI so that CORS is not needed?

On Thursday, February 22, 2018 at 8:08:06 PM UTC+5:30, Ron wrote:
>
> Even if you have the spec in the webapp folder, it’d be hosted just like 
> swagger-ui and have a URL – feed that to it.
>
> CORS is only needed if the host and port of the javascript and the target 
> calls are not the same, by definition.
>
>  
>
>  
>
>  
>
> *From: *> on behalf of Sayak 
> Paul >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Wednesday, February 21, 2018 at 20:57
> *To: *Swagger >
> *Subject: *Re: Running Swagger UI on Tomcat
>
>  
>
> 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: * on behalf of Sayak Paul <
> spsay...@gmail.com>
> *Reply-To: *"swagger-sw...@googlegroups.com" <
> swagger-sw...@googlegroups.com>
> *Date: *Tuesday, February 20, 2018 at 23:12
> *To: *Swagger 
> *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? 
>
>
> 
>
>   CorsFilter
>
>   org.apache.catalina.filters.CorsFilter
>
> 
>
> 
>
>   CorsFilter
>
>   /*
>
> 
>
> -- 
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com .
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Swagger UI on Tomcat

2018-02-22 Thread Ron Ratovsky
Even if you have the spec in the webapp folder, it’d be hosted just like 
swagger-ui and have a URL – feed that to it.

CORS is only needed if the host and port of the javascript and the target calls 
are not the same, by definition.

 

 

 

From:  on behalf of Sayak Paul 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Wednesday, February 21, 2018 at 20:57
To: Swagger 
Subject: Re: Running Swagger UI on Tomcat

 

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:  on behalf of Sayak Paul 

Reply-To: "swagger-sw...@googlegroups.com" 
Date: Tuesday, February 20, 2018 at 23:12
To: Swagger 
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? 


  CorsFilter
  org.apache.catalina.filters.CorsFilter


  CorsFilter
  /*

-- 
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Swagger UI on Tomcat

2018-02-21 Thread Sayak Paul
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: *> on behalf of Sayak 
> Paul >
> *Reply-To: *"swagger-sw...@googlegroups.com " <
> swagger-sw...@googlegroups.com >
> *Date: *Tuesday, February 20, 2018 at 23:12
> *To: *Swagger >
> *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? 
>
>
> 
>
>   CorsFilter
>
>   org.apache.catalina.filters.CorsFilter
>
> 
>
> 
>
>   CorsFilter
>
>   /*
>
> 
>
> -- 
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com .
> 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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Swagger UI on Tomcat

2018-02-21 Thread Ron Ratovsky
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:  on behalf of Sayak Paul 

Reply-To: "swagger-swaggersocket@googlegroups.com" 

Date: Tuesday, February 20, 2018 at 23:12
To: Swagger 
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? 


  CorsFilter
  org.apache.catalina.filters.CorsFilter


  CorsFilter
  /*

-- 
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.