Use go-openapi library for parsing?
jkinkead opened this issue · 4 comments
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.
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?
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.
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?
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?