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
I have trouble using Stripe OAS with OAS code generators, specifically in Go.
Let's take a look at an example of Stripe OAS below:
openapi: 3.0.0paths:
/v1/account:
get:
description: <p>Retrieves the details of an account.</p>operationId: GetAccountparameters:
- description: Specifies which fields in the response should be expanded.explode: truein: queryname: expandrequired: falseschema:
items:
maxLength: 5000type: stringtype: arraystyle: deepObject
And I understand that it is not a bug it is a feature, because you use a custom private code generator.
Also I guess that it is not possible to patch it simply like style: deepObject -> style: form, because, for instance, a stripe server will not accept it.
So that's why I think it would be nice to:
update documentation, add more explicit statement about a conformance with OAS 3.0.*;
add an OAS extension in case of expandable object.
For instance:
openapi: 3.0.0paths:
/v1/account:
get:
description: <p>Retrieves the details of an account.</p>operationId: GetAccountparameters:
- description: Specifies which fields in the response should be expanded.explode: truein: queryname: expandrequired: falseschema:
items:
maxLength: 5000type: stringtype: arraystyle: deepObjectx-vendor-style: stripe
It might allow to handle it more correctly in 3rd party code generators.
The text was updated successfully, but these errors were encountered:
I have trouble using Stripe OAS with OAS code generators, specifically in Go.
Let's take a look at an example of Stripe OAS below:
It belongs to a stripe specific feature like expandable objects - https://docs.stripe.com/api/expanding_objects.
But the
deepObject
style cannot represent arrays according to following info - https://swagger.io/specification/v3/#parameter-object.There you can find some examples how styles are applied.
A
form
style could have been used.It was mentioned earlier there - #153.
And I understand that it is not a bug it is a feature, because you use a custom private code generator.
Also I guess that it is not possible to patch it simply like
style: deepObject
->style: form
, because, for instance, a stripe server will not accept it.So that's why I think it would be nice to:
For instance:
It might allow to handle it more correctly in 3rd party code generators.
The text was updated successfully, but these errors were encountered: