openapi icon indicating copy to clipboard operation
openapi copied to clipboard

Request: Tag commits with Stripe API versions

Open kavdev opened this issue 5 years ago • 3 comments

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

kavdev avatar Jun 11 '19 23:06 kavdev

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

brandur-stripe avatar Jun 17 '19 15:06 brandur-stripe

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

kavdev avatar Jun 24 '19 16:06 kavdev

@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!

lx-stripe avatar Jul 30 '19 11:07 lx-stripe