question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request for API Version Chaining Feature

See original GitHub issue

Hey all, after discussions with Marsh at API Strat, I’m putting forth a feature request that allows for better API version discovery. It’s basically triplets (aka hypermedia) for versions.

Today, the spec allows for notation of the current version. However, humans and machines have no way of knowing if, when “interrogating” an particular OAS file, if you’re looking at the most current version, if there’s a previous version, or if there’s a next version. It’d be great if machines/humans could see where in the chain of versions, they are when looking at a specific spec.

So,

info: 
   version:                  2.4.1  (this version)
   previousVersion:  <uri to openapi spec for previous version>
   nextVersion:          <uri to openapi spec for next version>

pretty simple. from there, machines/humans can take care of the rest.

Background here is that tooling should be able to monitor a spec file to spot changes to the API. However, unless it’s a super minor change, then those changes trigger a new version and subsequently, those changes are reflected in a new spec file (as opposed to the existing spec file). But currently, there’s no way for machines/humans to determine from a current spec file if another spec file exists.

Extra credit might be another field to give some additional status as to the production-level of the current spec file. For example:

info: 
   version:                  2.4.1  (this version)
   previousVersion:  <uri to openapi spec for previous version>
   nextVersion:          <uri to openapi spec for next version> 
   productionStatus: Pre-Release

This might be more difficult as its effectiveness would require standard vocabulary which might trigger a difficult debate. But, if there’s interest in this feature, I do have suggested vocabulary that spans everything from pre-release to deactivated.

Thank you.

David Berlind ProgrammableWeb

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ioggstreamcommented, Jul 15, 2019

@dberlind I suggest to delegate the maturity status to a lifecycle parameter. Ideas?

info:
  version: 2.4.1
  lifecycle:
    maturity: pre-release  # or whatever, just define an enum
    links:
    - rel: prev
      url: https://prev-oas-spec
    - rel: next
      url: https://next-oas-spec

1reaction
dberlindcommented, Jul 15, 2019

@loggstream, quite frankly, it can go into any parameter as long as it is in there. The fact that this suggestion was refused as being out-of-scope for OAS is a travesty. API versioning is a major issue. Among the major API providers, we at ProgrammableWeb have observed with interest some evolving maturity in how API versioning is done so as to maintain some degree of continuity with developers. To suggest that version pointers are out of scope (when the spec already allows for the current version #) destroys one of the key objectives of machine-based introspection. Furthermore, to suggest it belongs in some other machine readable file as I believe was suggested here just highlights a key weakness in the REST architectural style vs. up and comers like gRPC and GraphQL (both of which involve “in-band” introspection vs. hunting down some file. Done right, all APIs should have some standard referral to the description and each description should be one link in a chain of descriptions. Anything else is a MAJOR developer inconvenience and my understanding having followed APIs and their predecessors closely for three decades is that developer empathy and experience is a #1 priority.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chaining Requests - Insomnia Docs
Insomnia allows chaining requests, or the ability to extract values from the responses of other requests. Values are passed using Template Tags and...
Read more >
Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
The optional chaining (?.) operator accesses an object's property or calls a function. If the object accessed or function called is ...
Read more >
Versioning | Cloud APIs - Google Cloud
This topic describes the versioning strategies used by Google APIs. In general, these strategies apply to all Google-managed services.
Read more >
How to chain API requests with Real-Time Examples - YouTube
postman #postmantutorial #apiautomation #apitesting #apitestingtutorials #manualtesting #manualtester #automation #automationtesting ...
Read more >
Intro to Postman | Part 5: Chain Requests - YouTube
Learn how to create a simple workflow by chaining multiple requests together in a logical sequence of events. And use Postman variables as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found