Replies: 2 comments 4 replies
-
Hey, thanks for sharing interest in implementing this. The docs recommend avoiding using HTTPS for grabbing specifications, and instead managing them via a manually updated copy of that file. I've previously used something like this GitHub Actions setup to make it possible to see when files are out-of-sync, and it may be straightforwardish to make an action that will also update this This could be improved via renovatebot/renovate#24730 (not yet implemented) Although it can be handy to do this, it can also lead to a number of issues with builds not being reproducible or having flaky builds due to network connectivity issues. |
Beta Was this translation helpful? Give feedback.
-
Thanks for a comprehensive answer. I see how your github action can be useful, but in my usecase for example, I would like to generate go client files by referencing openapi spec of services from other repositories, and there's no risk of something becoming out of sync. Anyways, I understand your decision. Thank you! |
Beta Was this translation helpful? Give feedback.
-
I know that you can use url instead of local path for your specification file
And I would like to use this feature in my project but my repositories are private so it's impossible atm.
I've noticet that the loader you're using has the ability to do that by overriding this function
https://github.com/getkin/kin-openapi/blob/f66e2a1cb3567e8214f5268a10d955dc24f72ade/openapi3/loader.go#L36
but you don't allow to set it.
I'd like to add a feature that would enable the oapi-codegen command to use authenticated tokens somehow, and I guess some other people could use that so I'd like to implement it in a way that could be merged into the master branch and released sometime, if it aligns with your vision of the project.
Therefore, I'd like to pitch some ideas about how this should be done so it doesn't violate your current vision of how the tool should be configured.
I think it would be enough to add ability to set Authentication header in config file, but I'm not sure if you even want such feature?
Beta Was this translation helpful? Give feedback.
All reactions