OpenAPI.NET.CSharpAnnotations
OpenAPI.NET.CSharpAnnotations copied to clipboard
Cannot parse x-functions-key parameter
I have a header parameter like the following- <param name="x-functions-key" cref="string" in="header">The secret key to call the function.</param>
But the swagger api parses it like "x-functions-key-functions-key"
@arefinsami This is an already existing roslyn issue, if you look at the xml you are providing to the library it would contain the param name as "x-functions-key-functions-key". And since we were not sure when roslyn will fix the issue, to workaround this set RemoveRoslynDuplicateStringFromParamName
in OpenApiDocumentGenerationSettings
to true and pass it to the GenerateDocument
method. Let us know if this doesn't solve the issue for you.
@Shwetap05, is it possible to configure the RemoveRoslynDuplicateStringFromParamName
setting when using the OpenAPI Document Tools - Build Task?