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

libopenapi to generate the model not just from bytes , but from go code too #225

Open
chinglinwen opened this issue Dec 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@chinglinwen
Copy link

from user point of view, I'm thinking what I'd like, hope this can bring some new ideas, or you can think of this as a feature request

a probable overview of the workflow:

  1. write go struct
  1. generate go code(an extra go file) (example openapi-gen)
  2. generate the final model (document.BuildV3Model()) from go code ( example )
  3. serve such json or yaml with http handler ( example )

some relate project I would like to libopenapi to be harmony with:

I'm thinking how could these all could work together, some kubernetes tool may have narrow scope, this where libopenapi could comes in ( a general rest api tool, provide simple method to generate openapi )

one idea, writing openapi.yaml are error prone
and I'd expect all things go code ( abstract away the detail )
decompose things to go code, and so I can compose the whole spec definition from go code, so maybe it will be more maintainable ( the whole process )

@daveshanley daveshanley added the enhancement New feature or request label Dec 20, 2023
@EwenQuim
Copy link

EwenQuim commented Feb 27, 2024

Trying to port Fuego to libopenapi.

Would love to have this feature, it would make the migration easier!

I might try to implement partially this feature for libopenapi

@daveshanley
Copy link
Member

Please feel free to contribute! This feature isn't on my immediate roadmap (I have no use for it myself right now), your PR would be welcome.

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

No branches or pull requests

3 participants