You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically those are two different examples. One is an example of for the schema which is modelled as Any and the other is the example property of requestBody which is an OpenApiExample.
If the example was set in the Schema object of the RequestBody.Content then it would render out in V2.
Activity
darrelmiller commentedon Apr 26, 2020
Technically those are two different examples. One is an example of for the schema which is modelled as Any and the other is the
exampleproperty of requestBody which is an OpenApiExample.If the example was set in the Schema object of the RequestBody.Content then it would render out in V2.
I suppose in the V2 translation, we could reach into the first requestBody.Content object and pull the Example.Value into the Schema example. Somewhere here I think https://github.com/microsoft/OpenAPI.NET/blob/master/src/Microsoft.OpenApi/Models/OpenApiOperation.cs#L250
mattfrear commentedon Oct 26, 2020
Hi Darrel
I ended up working around this issue by setting the
/definitions/[schemaType]/exampleobject myself.If you want to Close this issue, that's cool.
darrelmiller commentedon Mar 14, 2021
Examples are going to change again in 3.1 so we will deal with this in the 3.1 release.
MaggieKimani1 commentedon Mar 26, 2024
Fixed by #1538