Nswag clients with some endpoints excluded #5076
Open
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 2 new settings that allow some endpoints to be NOT generated.
Main benefits:
The first 2 benefits are relatively obvious but what this Pull-Request would help us the most are actually that we could facilitate some workflows.
a) When have a breaking change to an api we usually create a new version of the same endpoint and deprecate the old one. A few releases later we then remove the old api. However, when we remove the endpoint, NSWAG often changes some names of the new endpoint so the calling code has to be adapted as well. By always ignoring the deprecated endpoints, one could adjust the naming immediately and it not when we remove the endpoint (when it's less obvious).
b) sometimes we deliberately want an application to only use (or exclude) certain endpoints because of reasons like permissions / future plans for the api's etc. and it would help us to exclude some endpoints from the start to prevent new developers from unwanted endpoints by accident.
I hope this PR would also benefit a lot of other NSWAG users.
However, since I'm not too familiar with the project (from a contributor perspective), I will gladly make changes or accept feedback.
Anyway, would be glad about feedback and even more so if I could contribute to NSWAG.
PS: I tried a pull request before but for some reason it was rejected due to an ubuntu issue. (which I'm pretty but sure.. about 99.9% this PR should not affect this)