OpenAPI.NET
OpenAPI.NET copied to clipboard
hidi transform fails if input CSDL has Nullable set on a singleton
Describe the bug Nullable is a valid property of <Singleton> elements.
To Reproduce Run
hidi transform --csdl foo.csdl
where foo.csdl includes a Nullable attribute on a singleton.
Expected behavior Transformation succeeds with an appropriate mapping to OAS.
Actual behavior
crit: Microsoft.OpenApi.Hidi.Handlers.TransformCommandHandler[0]
Could not transform the document, reason: Encountered the following errors when parsing the CSDL document:
UnexpectedXmlAttribute : The attribute 'Nullable' was not expected in the given context. : (1, 956)
Additionally, the reported line number is bogus, as the input file only has 40 lines, with the error coming on line 35.
@garethj-msft, do you mind sharing the csdl file for me to reproduce the above scenario?
@garethj-msft according to the doc reference, a Singleton element expects only 2 attributes, Name
and Type