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

Document why skip-prune is not defailt #1442

Open
jamietanna opened this issue Jan 25, 2024 · 2 comments
Open

Document why skip-prune is not defailt #1442

jamietanna opened this issue Jan 25, 2024 · 2 comments

Comments

@jamietanna
Copy link
Member

Via:

         Probably not for this PR, but it would make sense to not prune code that is used in dependent APIs by default, instead of having to set this explicitly.

Originally posted by @markuswustenberg in #1389 (comment)

@jamietanna
Copy link
Member Author

This is called out in https://github.com/deepmap/oapi-codegen?tab=readme-ov-file#key-design-decisions - do we want any more than this?

@markuswustenberg
Copy link

The issue is about not pruning code that is used in other, dependent APIs, where those APIs are known when generating, I think? In which case it would make sense to not prune them by default, because they're used in the dependent APIs, and it otherwise leads to errors in the generated code.

TLDR: if an option is not optional but mandatory for the generated code to work, why is it an option?

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

No branches or pull requests

2 participants