Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger #feature #1094

Closed
klh opened this issue Nov 12, 2013 · 61 comments
Closed

Swagger #feature #1094

klh opened this issue Nov 12, 2013 · 61 comments

Comments

@klh
Copy link

klh commented Nov 12, 2013

Add Swagger to AUTO document the API in any project:
https://developers.helloreverb.com/swagger/

It would go well with the overall Sails mentality.

sample in use here:
http://swagger.wordnik.com/#!/pet

@anissen
Copy link

anissen commented Nov 12, 2013

👍

It should be configurable though; whether it should be accessible, at which route, by whom etc..

@artworkad
Copy link

👍 actually a must have

@adambiggs
Copy link

👍

Swagger has an express module that might be useful to build on.

@gregholland
Copy link

👍 An API is only as good as the documentation you provide :-)

@Postman-76
Copy link

👍

3 similar comments
@jeremypeters
Copy link

👍

@kbsanders
Copy link

👍

@kevinwolfcr
Copy link

👍

@fehguy
Copy link

fehguy commented Feb 6, 2014

at first glance, it looks like a swagger adapter would be easy to write, where the model schemas would be marshalled to JSON schema. If the adapter can get a handle to the controllers and routes, the rest should be easy.

@mikermcneil
Copy link
Member

👍

@opensas
Copy link

opensas commented Mar 6, 2014

1

(I suspect you all know an easier way to add this nice thumbs-up picture...)

@mikermcneil
Copy link
Member

@opensas

@mikermcneil
Copy link
Member

but yeah srsly guys I think this would be pretty sweet.

@RWOverdijk
Copy link
Contributor

I'm actually working on this already. Not using swagger, but similar idea. That's why I ran into the issue of there being duplicate routes.

If anyone feels like helping out or sharing thoughts, drop me a message.

@mikermcneil
Copy link
Member

@RWOverdijk awesome!

@fehguy
Copy link

fehguy commented Mar 6, 2014

@RWOverdijk how about collaborating and getting this working with swagger?

@klh
Copy link
Author

klh commented Mar 6, 2014

Isn't it non-core to "invent your own" whe swagger is a maintained system that could be an optional dependency instead?...just saying—
Sent from Mailbox for iPad

On Thu, Mar 6, 2014 at 9:46 PM, Tony Tam [email protected] wrote:

@RWOverdijk how about collaborating and getting this working with swagger?

Reply to this email directly or view it on GitHub:
#1094 (comment)

@RWOverdijk
Copy link
Contributor

Developers are always "inventing their own" if they think that the alternatives aren't good enough.

@fehguy
Copy link

fehguy commented Mar 6, 2014

sure thing. being the swagger spec maintainer, i'm happy to help implement this with some collaboration with the sails community.

@RWOverdijk
Copy link
Contributor

@fehguy We could still pull this off. I already have a list of routes, I just have to discuss which should go in, and how to gather descriptions. You could then use the data for swagger, and I can use it for Barque/Kamal.

@mikermcneil
Copy link
Member

@fehguy appreciate that :)

Swagger looks fantastic- look forward to chatting about it soon. We mentioned a weekly hangout a while ago, and this might be a good first topic. I'll post to the google group with some suggested times later this afternoon.

@kunjee17
Copy link

Is it there yet? Or yet to be added? If it haven't implemented yet. Any guide line how to implement it?

@adilwali
Copy link

adilwali commented May 6, 2014

Oh man! I'm so stoked to have this!!! 👍

@mikermcneil
Copy link
Member

guys, we're aware of this and we really want to see it happen. Check out the new usage option in routes-- the best place for this is probably a grunt task that inspects routes and blueprints. Closing for now, if anyone has a particular take on this which is different than the discussion covered here, feel free to open a new issue. Thanks!

@kunjee17
Copy link

@mikermcneil thanks for reply. Where I can found details for usage as I was unable to found anything in current or beta documentation.

@eddieajau
Copy link

@kunjee17 did you find the information for usage?

@ptos79
Copy link

ptos79 commented Oct 8, 2014

@kunjee17
Copy link

@eddieajau not as of now... :(

@quocvu
Copy link

quocvu commented Nov 19, 2014

When is swagger integration planned to be released? I can help if needed.
I have used the Loopback framework and really miss the API explorer.

@medokin
Copy link

medokin commented Feb 4, 2015

+1

@karantan
Copy link

+1
Any updates on this?

@ifig
Copy link

ifig commented Mar 6, 2015

+1

@bostrom
Copy link

bostrom commented Mar 6, 2015

I don't fully understand the last comment from @mikermcneil about the usage section, nor the reason for closing this issue. I'd also really like to see some easy way to generate a swagger.json documenting the API of my Sails project, either via a dependency or out-of-the-box. Is anyone working on it at the moment or has it been completely swept under the rug?

@flipside
Copy link

+2

@leoliew
Copy link

leoliew commented Apr 2, 2015

+1

@fehguy
Copy link

fehguy commented Apr 2, 2015

We have a lot of interest to do this. I'm happy to help contribute if someone wants to join me with some pointers on getting to the routes, etc inside of sails.

@tjwebb
Copy link
Contributor

tjwebb commented Apr 2, 2015

I've set up a repo based on swagger-express: https://github.com/tjwebb/swagger-sails. I'd love to get some help on it. Basically my plan would be to expose the underlying express object in sails to swagger-express and go from there. Maybe that's all it takes to get a decent first version up and running, and then we can get more detailed metadata from waterline and so forth. Sound good?

sails's express instance is sails.hooks.http.app

@jfexyz
Copy link

jfexyz commented Apr 2, 2015

Just FYI, swagger-express only works with Swagger 1.2...

@tjwebb
Copy link
Contributor

tjwebb commented Apr 2, 2015

Ah ok, looks like forking https://github.com/paulhill/swagger-n will be a better way to start then.

@fehguy
Copy link

fehguy commented Apr 3, 2015

This is the direction swagger for node has been going:

https://github.com/swagger-api/swagger-codegen/tree/master/samples/server/petstore/nodejs

This uses the swagger specification (JSON format in this example) as the DSL that routes http requests to a controller.

It's relying on middleware from the apigee-127 project by @whitlockjc. I believe that with this--and the hooks into sails routing may be a killer combo. I'll dig into the sails router shortly.

BTW the swagger-tools project works with both 1.2 and 2.0 specs, and is thoroughly tested.

@285858315
Copy link

+1

@dinana
Copy link

dinana commented Apr 24, 2015

@tjwebb @fehguy : What's the latest direction here and how can I help?

@tjwebb
Copy link
Contributor

tjwebb commented May 1, 2015

At this point we're looking for a team of community members to help out. It looks like there's a ton of interest here, we're just swamped at the moment at Balderdash. I think @renanvieira wants to help out too.

Do you guys want to fork https://github.com/tjwebb/sails-swagger and get started there? A basic API generator would be an awesome first step :) I can help out here and there where I can, and review PRs

Here are some examples: https://github.com/swagger-api/swagger-spec#nodejs

Feel free to file issues, requests, ideas, and comments in that repository. Thanks!

@ifig
Copy link

ifig commented May 11, 2015

I am going to take a look at it, I see swagger as a documentation tool more than an API generator, and that's where my focus will go.

@Cooker-Monster
Copy link

Hi !
Could be very smart indeed : very fast API code thanks to Sails and nice API browser thanks to Swagger ...
By the way, Swagger is going further than an Api doc tool and Sails generator from Swagger Specification 2.0 makes sense to me.
My 2 cents !

@armellarcier
Copy link
Contributor

Yet another +1

@nnn-gif
Copy link

nnn-gif commented Aug 3, 2015

+1

@dlai0001
Copy link

👍 love to see swagger in Sails.

@whitlockjc
Copy link

I've just released sway, the API behind swagger-tools, and the plan is to create some sway-based middleware/plugins/integrations for Connect, Express, Hapi, Restify and Sails. I'll update this issue as things progress.

@tjwebb
Copy link
Contributor

tjwebb commented Aug 28, 2015

Hey guys,

I built a swagger sails hook that generates a Swagger 2.0 document: https://github.com/tjwebb/sails-swagger

It's alpha-quality at this point, but it basically works.

@tjwebb tjwebb closed this as completed Sep 1, 2015
@fehguy
Copy link

fehguy commented Sep 1, 2015

This is awesome, thank you!

@yz89
Copy link

yz89 commented Sep 3, 2015

@tjwebb thank you!

@orhemi
Copy link

orhemi commented Sep 29, 2015

@tjwebb Thanks for your work !
But, it's not working with sails v0.11.

There is any hope to see it working soon?

@tjwebb
Copy link
Contributor

tjwebb commented Sep 29, 2015

It currently only works on master, I hope to see the latest sails released
soon.

On Tue, Sep 29, 2015 at 4:50 AM, orhemi [email protected] wrote:

@tjwebb https://github.com/tjwebb Thanks for your work !
But, it's not working with sails v0.11.

There is any hope to see it working soon?


Reply to this email directly or view it on GitHub
#1094 (comment).

@arnthorsnaer
Copy link

Looking forward to trying out swagger-sails when sails.js 0.12 is released

@theoomoregbee
Copy link

anyone here can check out this library i think it better solve the problem and open for contributions

https://github.com/theo4u/sails-hook-swagger-generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests