stripe / openapi

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

Request: Tag commits with Stripe API versions #43

Open kavdev opened 5 years ago

kavdev commented 5 years ago

Hi there!

Would it be possible to create tags with stripe api versions (e.g. 2019-05-16)? The dj-stripe library contributors are working on automatically generating fixtures, and we'd love to be able to pull down fixtures/schema by api version.

Best, Alex

brandur-stripe commented 5 years ago

Hey Alexander,

This should be possible, but we'd need to re-arrange our update scripts somewhat to give the current one access to a GitHub API key that could be used to produce the tag.

A potential problem here for you though is that we're still currently treating the OpenAPI specification as a "forward only" affair. If you look at the repository's history you can get specs for old API versions, but those specs are never updated even though the API version they're tagged under might change as new forwards-compatible API features are added. The effective result is that the only OpenAPI specification that we really guarantee to be accurate is the one under master.

cc @stripe/api-libraries

kavdev commented 5 years ago

@brandur-stripe No worries, that'll work for us. Thanks!

lx-stripe commented 5 years ago

@kavdev I hacked a script to map API versions to spec revisions: table here as well as other endpoints. I'll probably extend this a bit (eg. to support older openapi specs) and host it somewhere else... but in the meanwhile, feel free to tweak it to your needs. Hope this helps!