-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Labels
Description
Hey There!
I have a few questions about the OpenAPI spec:
- I noticed the
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.
"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
anyOfand lists between the properties of the object or an emptyenum, like the following fromPOST /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!