I created a hello-world project using Apigee-127. I also understand there is a swagger spec file of the API under api/swagger/swagger.yaml
I'm just not able to find the path to Swagger UI for the /hello API configured.
How can I access this Swagger UI? Is this possible?
Sample swagger UI: http://petstore.swagger.wordnik.com/
Answer by Jeremy Whitlock · Sep 25, 2014 at 04:23 PM
Are you wanting to view the Swagger UI and editor? If so, @Michael Malloy has the correct answer. If you're wanting your API to ship with endpoints that serve your Swagger document (swagger.yaml) and Swagger UI, that's a feature we are currently working on.
Can you give us an indication on when this feature will be available?
I'm trying to get my organization away from RAML and onto Swagger because of the better tooling (a127 = nectar!). It's very hard, however, to do model-driven development when the only guy who can see the model - which in this case is a rendered version of swagger.yaml - is the guy that wrote it.
I can currently achieve model-driven api development using the Mulesoft toolset but like I said, I like a127 better.
Please tell me this feature is imminent...
We are actively working on it and want this feature too! In the meantime, if this is an option, you can use a link such as the following:
This enables you to share the Swagger spec with nice formatting and docs right now. This is not the final approach, however, just something to bridge the gap.
The dependency library that provides this feature for a127 has been updated with this feature and has been pushed to NPM. Getting a127 updated to use this feature and expose it should not take much longer, although I cannot give you an exact timeline. As Jeff said, we're actively working on it and cannot wait to deliver this.
Yes, I'm looking for Swagger document which can just serve the Swagger UI, so that API consumers can see and test.
But @Jeremy Whitlock, @jwest1, if I absolutely have to use Swagger UI, can I use the a127 swagger.yaml and serve it externally via a standalone static Swagger UI server?
Oh I just realized, Swagger UI currently doesn't support Swagger Spec 2.0 yet.
https://github.com/wordnik/swagger-ui#compatabilit...
Bummer.
Swagger 2.0 support for swagger-ui@master works but it has a few caveats which we will make sure to document. I will not promise a timeline but know that the dependency library that provides this feature for a127 has been updated with this feature and has been pushed to NPM. Getting a127 updated to use this feature and expose it should not take much longer.
Hello. Is an update for this? i start messing around with apigee127 and created the hello world api. So can I publish a URL for the swagger UI so other developers can see in pretty format my API and have a sandbox too?
Answer by Michael Malloy
·
Sep 25, 2014 at 03:12 PM
To see and edit your swagger spec file, in a terminal cd to the project directory. Then, from the command line enter "a127 project edit". This should open up your swagger document in the browser. Be sure that you do not kill the edit process, or else any changes to your document will not be saved.
Answer by cesdaile · May 02, 2015 at 06:57 PM
@Jeremy Whitlock just wondering if the ability to expose the a127 managed swagger.yaml / json meta data is available locally yet through swagger-ui in the latest updates to a127.
If you have latest a127, then underlying swagger.json is available at /swagger which you can now use in swagger-ui.
how about the /docs and /api-docs endpoints that appear the intention was to host the swagger-ui - seems the middleware is there in node_modules/a127-magic/node_modules/swagger-tools/middleware/2.0 but just not wired up (well at least in the project skeleton i pulled this week)
Access access token custom attributes in ApiGee 127 Node.js controller file 1 Answer
Script executed prematurely error when trying to call Apigee 127 endpoint 1 Answer
remote analytics not working 3 Answers
Run some function on specific message processor only 1 Answer
Do promises work in Apigee NodeJS 7 Answers