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 Spec V2 #2

Open
brownell opened this issue May 8, 2015 · 7 comments
Open

Swagger Spec V2 #2

brownell opened this issue May 8, 2015 · 7 comments

Comments

@brownell
Copy link

brownell commented May 8, 2015

Any plans to have this support the Version 2.0 spec?

@rodw
Copy link
Member

rodw commented May 8, 2015

Hi @brownell.

We don't yet have any specific plans to support the Version 2 Swagger JSON format, but only due to a lack of time or demand for it.

I haven't looked at the necessary changes in detail (yet) but if you have any patches or advice they are more than welcome.

@brownell
Copy link
Author

brownell commented May 8, 2015

Thanks Rod. I might give it a try in a fork.
BTW, can you point me any any really built-out swagger.json files that use all the bells and whistles?

@rodw
Copy link
Member

rodw commented Jul 5, 2015

Hi @brownell. As you may have seen, there are some examples and additional syntax information available at https://github.com/intellinote/swagger-dsl/blob/master/docs/syntax.md.

I'll try to post a more complete example. If you email me at rod (dot) waldhoff (at) intellinote.net I'd be happy to send you the Swagger DSL code for the documentation https://api.intellinote.net/rest/api/v2/, but it may be a little idiomatic and hence not the easiest introduction to follow.

@mknippen
Copy link

mknippen commented Sep 1, 2015

+1 for the fact that I would love this feature!

@mknippen
Copy link

mknippen commented Sep 1, 2015

It may be worth looking into this: https://github.com/apigee-127/swagger-converter

@jadbox
Copy link

jadbox commented Sep 10, 2015

+1 for Swagger 2

@rodw
Copy link
Member

rodw commented Jan 17, 2016

Hi everyone,

I've finally gotten around to updating Swagger DSL to support (generate) the Swagger 2 syntax.

In the swag214 branch of this repository you'll find a work-in-progress version of Swagger DSL that supports Swagger2.

There's a few areas that could be improved, and I want to let this germinate a bit before making a formal release of it, but I've started using the swag214 branch and have found it pretty functional so far. (As a word of warning, I'm not deeply committed to any of the syntax used in the swag214 branch right now, so things may change a bit before the final release.)

Please note that I found it easier to make some small changes to the Swagger DSL syntax (in response to corresponding changes in the Swagger JSON format) so the new format isn't (currently) 100% compatible with the old format, but the changes are relatively small. If 100% compatibility is important to anyone I'd be happy to try to find a way to be fully backwards compatible or provide an upgrade script of some sort.

This isn't the cleanest or clearest code to read (as I discovered when I dusted it off in order to start this upgrade) but any contributions are more than welcome. In addition, if anyone has time to work with this new version of the DSL and provide feedback, suggestions or bug reports that would be a great help.

@brownell @jadbox @mknippen

PS: In case you've been using the npm distribution of Swagger DSL, one relatively easy way to run this new version is the following process:

  1. Clone the swag214 branch of this repository.
  2. Run npm install (or make install) to install the external files that are needed.
  3. Run coffee lib/swagger-dsl.coffee <YOUR-DSL-FILE> to process a given file.

For example, to install:

git clone [email protected]:intellinote/swagger-dsl.git
cd swagger-dsl
git checkout swag214
npm install

and to run:

coffee lib/swagger-dsl.coffee examples/petstore.dsl.coffee

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

No branches or pull requests

4 participants