Bug report about parameter references
I'm new to REST, so I have been using Copilot to generate a YAML file to import in SoapUI 5.10.0. The AI generated and "normalized" a YAML file for openAPI version 3.1.0.
This YAML is perfectly fine in Visual Studio and in the online Swagger editor. SoapUI, on the other hand, coughs up an error on this part:
parameters:
$ref: '#/components/parameters/sessionId'
After deciding to take the long but infallible road of removing parts of the YAML, it all came down to the hyphen preceding the "$ref" keyword. Copilot told me that this character is used to identify an array. Otherwise, it becomes an object.
Anyway, I removed it and the import worked, up to the next reference that also contained the hyphen... but this time, it was two references:
parameters:
- $ref: '#/components/parameters/UserId'
- $ref: '#/components/parameters/sessionId'
I had a feeling that things would go bad, here, and I was right. OpenUI did not like the hyphen. But removing the hyphens caused it to be an object (or something). This time, it didn't like that it was NOT an array.
So, in SoapUI, I'm stuck. I can't remove the '-', but I also can't keep them.
Any thoughts?
Here's the original header of my YAML.
openapi: 3.1.0
# jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base
The commented dialect was generated by Copilot. But the online Swagger editor did not like it, so I replaced it.