stripe / openapi

An OpenAPI specification for the Stripe API.
MIT License
394 stars 123 forks source link

subscription_proration_date nullability #38

Closed jleclanche closed 1 year ago

jleclanche commented 6 years ago
        subscription_proration_date:
          description: Only set for upcoming invoices that preview prorations. The
            time used to calculate prorations.
          type: integer

So I don't understand that field and it's inconsistent with the rest of the API. It's not marked as nullable, but it's marked as optional. It sounds like it won't ever show up as null but it will simply not show up.

Is that correct? Isn't it simpler to just call it nullable?

jleclanche commented 6 years ago

Refund.failure_balance_transaction, failure_reason are in the same case. Looks like it's all fields tagged "optional" in the api, which is metadata the spec doesn't have.

pakrym-stripe commented 1 year ago

I apologize for the extremely delayed response. The properties you've mentioned are indeed optional (might not be present) in response. OpenAPI defined optional properties as the ones not present in the required list (see Schema Object section of https://swagger.io/specification/).