Referring local JSON specification file

已查看 21 次
跳至第一个未读帖子

Ashok Kumar Soundararajan

未读,
2015年8月28日 08:10:052015/8/28
收件人 Swagger
Hi,

I have my swagger specification JSON file local to my project.

How do I refer it in swagger so that the documentation is generated from my local file?

I believe it should be specified in URL in index.html, but not sure how exactly I should mention the file path.

Please help in this regard.

Regards,
Ashok

Ron Ratovsky

未读,
2015年8月28日 08:11:082015/8/28
收件人 Swagger
You can't mention a file path. You can include the JSON in the index.html and pass it internally to the SwaggerUi object.

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



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

Ashok Kumar Soundararajan

未读,
2015年8月28日 08:49:412015/8/28
收件人 Swagger
Thank you Ron. Can you please give me a sample code(as how to JSON in the index.html and pass it internally to the SwaggerUi object)  as I am very new to swagger.

Appreciate your help....


On Friday, 28 August 2015 17:41:08 UTC+5:30, Ron wrote:
You can't mention a file path. You can include the JSON in the index.html and pass it internally to the SwaggerUi object.

On Fri, Aug 28, 2015 at 3:10 PM, Ashok Kumar Soundararajan <blosso...@gmail.com> wrote:
Hi,

I have my swagger specification JSON file local to my project.

How do I refer it in swagger so that the documentation is generated from my local file?

I believe it should be specified in URL in index.html, but not sure how exactly I should mention the file path.

Please help in this regard.

Regards,
Ashok





--

Ron Ratovsky

未读,
2015年8月28日 08:51:512015/8/28
收件人 Swagger
Look at the 'spec' parameter here - https://github.com/swagger-api/swagger-ui#parameters.

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

Ashok Kumar Soundararajan

未读,
2015年8月28日 08:54:002015/8/28
收件人 Swagger
Cool....Thank you so much Ron
回复全部
回复作者
转发
0 个新帖子