Allow endpoints to be excluded by path and/or by deprecated #5075
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.
Benefits and reasons for this PR:
-- this is probably more relevant for typescript but since it is easy to do the same for C# I added it too.
-- For example, in my company, we may not use deprecated api's and by ignoring such endpoints we already get a compile error stream lines the work flows.
-- This would also help us with a very specific problems that we sometimes have, when we deprecate a new endpoint, we usually have to create a new version. After many releases, we can then finally remove the deprecated endpoint. Unfortunately, we often have to adapt client code as well because the names of the remaining endpoints changes (due to some NSWAG counter). This is actually quite a big nuisance. With this change, we could mitigate this problem as the same person that deprecates the code would be able to adjust the calling code as well.
While I'm sure my PR works, I doubt that this change will end up like this in NSWAG. I just found this might be the best way to have this discussed. Some questions from my side:
Anyway, would be glad about feedback and even more so if I could contribute to NSWAG.