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

Add import/export for Swagger / OpenAPI format #86

Closed
255kb opened this issue Dec 31, 2018 · 14 comments · Fixed by #263
Closed

Add import/export for Swagger / OpenAPI format #86

255kb opened this issue Dec 31, 2018 · 14 comments · Fixed by #263
Assignees
Labels
feature New feature request
Milestone

Comments

@255kb
Copy link
Member

255kb commented Dec 31, 2018

Implement feature to import/export JSON or YAML files in Swagger / OpenAPI format.
Both v2.0 and 3.0 of the format will be supported.

(OpenAPI format was chosen after a poll in #38)

@255kb 255kb self-assigned this Dec 31, 2018
@255kb 255kb added the feature New feature request label Dec 31, 2018
@255kb 255kb modified the milestone: Next release Dec 31, 2018
@mixels
Copy link

mixels commented Jan 3, 2019

This issue mentions both Swagger and OpenAPI. Is that Swagger v2 and OpenAPI v3? Or one or the other?

@255kb
Copy link
Member Author

255kb commented Jan 3, 2019

Yes, Swagger format (Swagger 2.0) is now OpenAPI v3. (Source: https://swagger.io/docs/specification/about/) They are basically two versions of the same thing, a little bit different but not too much. So creating one parser for both should not be that complicated (it's already WIP).
However, I won't be able to support everything from the specification, some complex behaviors are not easily importable.

@aakash1313
Copy link

@255kb : When is swagger import expected to be released?

@255kb
Copy link
Member Author

255kb commented Feb 2, 2019

@aakash1313 I started working on it, but I have very limited time at the moment to work on Mockoon, so don't expect this feature before several weeks / months

@255kb 255kb modified the milestones: Next release, Future release Apr 12, 2019
@alexsandro-xpt
Copy link

+1

@bart
Copy link

bart commented Aug 2, 2019

+1

@255kb 255kb modified the milestones: v1.5.0, v1.6.0 Sep 2, 2019
@gervaisb
Copy link

Exporting a mock to OpenApi will be a great feature too.
For sure you will not be able to generate a fully featured spec but the skeleton will be a good starting point.

@255kb
Copy link
Member Author

255kb commented Oct 24, 2019

@gervaisb I wanted to ask this exact question! I am currently working on this, import is already well advanced (multiple route support, headers, etc only thing is to generate mock data based on the objects references in the openapi file). But I wondered if export would make sense as we may not generate something as rich as an regular OpenAPI file.

@gervaisb
Copy link

I can easily imagine that someone will use mockoon to draw the API. When the state is tested and approved by other it generate the spec and give it as base document for others that complete it with the details.
But since the routes, responses and main rules are defined the remaining part is documentation and "implementation detail"..

@255kb
Copy link
Member Author

255kb commented Oct 24, 2019

@gervaisb that's true, it would definitely be useful.
It will be in release 1.6.0 but there is still some work to do

@255kb 255kb removed this from the v1.6.0 milestone Nov 7, 2019
@fsalata
Copy link

fsalata commented Dec 20, 2019

Any update on this?

@255kb
Copy link
Member Author

255kb commented Dec 20, 2019

@fsalata I finished the import part, I must now write the tests and the export (which will be quicker). But I have limited time to work on Mockoon (it's a side project), and reviewing contributions, answering messages, etc is already taking a lot of time!
I hope you understand :)
But it will definitely be in the next version.

@mackelito
Copy link

I just found this project and just wanted to say how nice it is!
Keep up the good work! If I'm ever in Luxembourg I'll buy you a 🍺! 😄

@255kb
Copy link
Member Author

255kb commented Mar 5, 2020

@mackelito thanks for the kind words! 😄
This feature is definitely coming for v1.8.0, which will be quite a big release.
Everything took more time than planned and the time I could spend on the project was scarcer during the last months...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants