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

Use go-openapi library for parsing? #38

Open
jkinkead opened this issue Oct 5, 2017 · 4 comments
Open

Use go-openapi library for parsing? #38

jkinkead opened this issue Oct 5, 2017 · 4 comments

Comments

@jkinkead
Copy link
Contributor

jkinkead commented Oct 5, 2017

The go-openapi group has very rich Swagger support, particularly for parsing & resolving references.

It might make sense to rewrite the generation logic to use this library, instead of re-writing the swagger logic from scratch.

I might take a stab at this in the future, if this sounds reasonable.

@jprobinson
Copy link
Contributor

Interesting. This could very well make the switch to v3 a bit smoother. Definitely interested in giving it a shot and will gladly work with you on a PR.

Just curious, have you run into any problems with the reference resolving or parsing so far that you think may be fixed with go-openapi?

@jkinkead
Copy link
Contributor Author

jkinkead commented Oct 5, 2017

I haven't run into any problems with the parser that I haven't patched. :)

I have been needing to perform some additional introspection on the parsed swagger file, and the openapi-go libraries are better for that (more exported utility methods).

It's worth noting that it doesn't support swagger 3.0 yet.

@bhechinger
Copy link

One of the things I was hoping for was less awful function names with some swagger specs (just they way they are laid out) and I was curious if this would help deal with that at all?

@jprobinson
Copy link
Contributor

Howdy @bhechinger!

The leap to 3.0 may take some time but we do have something within 2.0's Operation Object that could help with better function names: the operationId

I'm down to make a change that, if provided, we will use the operationId for the function name if it is provided. Would that satisfy your needs?

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

3 participants