openapi icon indicating copy to clipboard operation
openapi copied to clipboard

definitions.charge.properties.source has an odd type

Open dwwoelfel opened this issue 7 years ago • 1 comments

The charge.source property is {"$ref": "#/definitions/account_debit_account"}, should that be some other type, e.g. card or a oneOf type?

dwwoelfel avatar Dec 04 '17 02:12 dwwoelfel

Hey @dwwoelfel, it should, but OpenAPI 2.0 doesn't support oneOf and its like in a few places so the spec we produce for that version has a number of inaccuracies.

This has been addressed for OpenAPI 3.0 which has broader support for things. Can you see if you could use that instead? Here's charge.source for example:

https://github.com/stripe/openapi/blob/master/openapi/spec3.yaml#L1483-L1491

brandur-stripe avatar Dec 05 '17 17:12 brandur-stripe

source is now defined as:

   anyOf:
          - "$ref": "#/components/schemas/payment_source"

pakrym-stripe avatar Jan 17 '23 17:01 pakrym-stripe