OpenAPI.NET.CSharpAnnotations
OpenAPI.NET.CSharpAnnotations copied to clipboard
Add the ability to generate variant documents without also generating the master document
I have a service where the APIs are versioned by a header and are otherwise the same url and verb across several controllers. I'm using a variant in advanced config to generate separate documents for each version, but when I do that the "master" document is still generated resulting in a number of duplicate exceptions because of the same url+verb being used on two or more methods. This is particularly an issue when using the VSTS Task to generate this data in Azure DevOps pipelines, because that step will always fail due to the master document's duplicate issues. For now I have to mark my step as continueOnError: true in my pipeline definition, which is not ideal. My preference would be to tell the task either what variants to build, or to only build named variants and not the variant = null master document.