Location of Swagger definition file

2,048 views
Skip to first unread message

Chris Lovie-Tyler

unread,
Apr 14, 2016, 7:14:34 PM4/14/16
to Swagger
Hi,

One of our development teams has included the Swagger Core and Swagger UI libraries in a web service package they have created so that when the package is installed the Swagger UI is automatically generated.

These might be dumb questions, but:
  • Where is the definition that Swagger generates (swagger.json) located?
  • As an alternative to navigating to the right directory, is it possible to open the file from within the Swagger UI somehow, or by appending something to the URL?
All I want is to be able to locate the definition file so I can import it into a couple of documentation platforms I'm testing (Gelato and readme).

Any help would be greatly appreciated!

Cheers,
Chris.



wing328

unread,
Apr 18, 2016, 4:33:40 AM4/18/16
to Swagger
Have you tried using the find command to locate the swagger.json file?

e.g. find . -name "swagger.json"

Btw, you can also use Swagger Codegen to generate HTML documentation and some API clients (e.g. C#, Ruby, PHP, etc) also come with markdown documentation. Here are some examples:


William


Chris Lovie-Tyler於 2016年4月15日星期五 UTC+8上午7時14分34秒寫道:
Message has been deleted

Chris Lovie-Tyler

unread,
Apr 18, 2016, 4:39:59 PM4/18/16
to Swagger
Thanks, William. I'd done a search, but not used the command line.

I'll check out those links too.

Cheers!

tony tam

unread,
Apr 18, 2016, 4:42:17 PM4/18/16
to swagger-sw...@googlegroups.com
Hi Chris, if you’re talking about swagger-core (i.e. https://github.com/swagger-api/swagger-core) then you will find your swagger.json | swagger.yaml under your {webroot}/swagger.json.

The webroot can be defined in different locations, so you may need to ask your developers where they put it.  Typically this is “where the jersey servlet is mounted”

Again, all assuming you’re talking about swagger-core from the swagger-api github org.



--
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.

Reply all
Reply to author
Forward
0 new messages