Option to exclude deprecated endpoints #5316
Open
+825
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added a new option "excludeDeprecated" to exclude deprecated endpoints from client generation.
My motivation for this change comes from the experience I have within my own company where we have a huge api that is used internally by many different applications but also exposed to the outside world. We have a policy that we never consume deprecated endpoints ourselves. However, sometimes this policy is hard to follow (sometimes depending on the repo and it's settings). Excluding every deprecated endpoint would help us a lot as we would get compile time errors, once "excludeDeprecated" is set to true. Furthermore, there it size of the clients would be removed, especially for Typescript and some complexity for the developer is removed.
PS: A lot of the changes were similar as a checkin from 4 months ago that added the settings "includedOperationIds" and "excludedOperationIds". Helped me a lot and I think that functionality will also help us. Thanks Amine. But I still think this would be helpful