if an openapi operation contains the same extension twice, nswag will just set the value to the last entry.
for example when the document contains:
/action
get:
x-property: a
x-property: b
the liquid file will get the property value as "b".
when using https://editor.swagger.io/ to edit the file, it flags the duplicate as error.
but nswag doesn't throw an exception on this.
while debugging nswag I noticed that YamlDotNet already returns just the last entry, without doing any validations.
i'm not sure if this is valid in Yaml or not (maybe it's just invalid in openapi).
is there a plan to validate the openapi document?
if not, I will have to find another tool to do this.
I am using operation.ExtensionData in the Controller.liquid template to generate some extra code. (see https://github.com/RicoSuter/NSwag/issues/1436 for more details).
if an openapi operation contains the same extension twice, nswag will just set the value to the last entry.
for example when the document contains: /action get: x-property: a x-property: b
the liquid file will get the property value as "b".
when using https://editor.swagger.io/ to edit the file, it flags the duplicate as error. but nswag doesn't throw an exception on this.
while debugging nswag I noticed that YamlDotNet already returns just the last entry, without doing any validations. i'm not sure if this is valid in Yaml or not (maybe it's just invalid in openapi).
is there a plan to validate the openapi document? if not, I will have to find another tool to do this.