Hey There!
I have a few questions about the OpenAPI spec:
- I noticed the
Create Charge endpoint (POST /v1/charges) in the spec had an extra parameter defined in the request body called card that I could not find in the latest docs.
"card": {
"anyOf": [
{
"properties": {
"address_city": {
"maxLength": 5000,
"type": "string"
},
// ...
},
"required": [
"exp_month",
"exp_year",
"number"
],
"title": "customer_payment_source_card",
"type": "object"
},
{
"maxLength": 5000,
"type": "string"
}
],
"description": "A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js).",
"x-stripeBypassValidation": true
},
I was wondering how in-sync the OpenAPI spec is with API docs and the actual released API in general. Is that a new field that will be added in a later version, or just a typo and shouldn't be there?
- I also noticed that some parameters in the request body, mainly objects, are defined with
anyOf and lists between the properties of the object or an empty enum, like the following from POST /v1/customers:
"address": {
"anyOf": [
{
"properties": {
"city": {
"maxLength": 5000,
"type": "string"
},
// ...
},
"required": [
"line1"
],
"title": "address",
"type": "object"
},
{
"enum": [
""
],
"type": "string"
}
],
"description": "The customer's address."
},
Does that imply that the address object is an optional parameter, as it's mentioned in the docs, and that's just hows its represented in the OpenAPI spec?
I'd appreciate it if someone can help shed some light on my questions.
Thanks!
Hey There!
I have a few questions about the OpenAPI spec:
Create Chargeendpoint (POST /v1/charges) in the spec had an extra parameter defined in the request body calledcardthat I could not find in the latest docs.I was wondering how in-sync the OpenAPI spec is with API docs and the actual released API in general. Is that a new field that will be added in a later version, or just a typo and shouldn't be there?
anyOfand lists between the properties of the object or an emptyenum, like the following fromPOST /v1/customers:Does that imply that the
addressobject is an optional parameter, as it's mentioned in the docs, and that's just hows its represented in the OpenAPI spec?I'd appreciate it if someone can help shed some light on my questions.
Thanks!