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

Create Flow types from Swagger Schema #40

Open
mycrobe opened this issue Mar 8, 2016 · 5 comments
Open

Create Flow types from Swagger Schema #40

mycrobe opened this issue Mar 8, 2016 · 5 comments

Comments

@mycrobe
Copy link
Collaborator

mycrobe commented Mar 8, 2016

We have a nice Schema Document. We should use to generate Flow types so that we can have compile-time warnings when the schema changes under a client's feet.

@mycrobe
Copy link
Collaborator Author

mycrobe commented Mar 8, 2016

Here is an out-of-date module that generates flow types from a swagger 1.2 document.

@mycrobe
Copy link
Collaborator Author

mycrobe commented Mar 8, 2016

Here is a fork of that code that has been modified to work with swagger 2.

@mycrobe
Copy link
Collaborator Author

mycrobe commented Mar 8, 2016

Unfortunately, that fork has issues that will need to be fixed:

  • In our schema, type is optional, and defaults to object. This code barfs if type is undefined.
  • It does not support the allOf compositional style we use for e.g. Genetree nodes.

@mycrobe
Copy link
Collaborator Author

mycrobe commented Mar 8, 2016

Here is my fork of the project, where I'm addressing those things.

@mycrobe
Copy link
Collaborator Author

mycrobe commented Mar 17, 2016

Hold the phone; swagger-js-codegen is in active development.

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

No branches or pull requests

1 participant