Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Handling #79

Closed
Tracked by #82
brian-comply0 opened this issue Jan 29, 2024 · 5 comments
Closed
Tracked by #82

Version Handling #79

brian-comply0 opened this issue Jan 29, 2024 · 5 comments
Assignees
Labels
api-consideration REST API endpoints should be considered as part of this task

Comments

@brian-comply0
Copy link
Contributor

As an author of software that calls the OSCAL REST OpenAPI specification, I want to be able to indicate which version of the API spec I am using. This will be important once we get beyond version 1.0.0.

The syntax for identifying the version should be selected, such that it is optional. The implementation may elect to either always require the version or allow it to be omitted. Any implementation that allows the version to be omitted must use the latest available version when no version is specified.

The REST API specification must also provide a mechanism for indicating what version(s) of the specification are supported by a specific implementation.

@cdroblee cdroblee added the api-consideration REST API endpoints should be considered as part of this task label Jan 30, 2024
@cdroblee
Copy link

@brian-comply0 definitely good to be thinking about this now.

There are lots of established best practices on how to implement API versioning. I generally prefer URI-based versioning (e.g. https://api.oscal.io/api/v1/catalog) as it's the most explicit and easiest to control, but header and body versioning are also quite common:

image

Here's a good summary of different best practices.

1 similar comment
@cdroblee
Copy link

@brian-comply0 definitely good to be thinking about this now.

There are lots of established best practices on how to implement API versioning. I generally prefer URI-based versioning (e.g. https://api.oscal.io/api/v1/catalog) as it's the most explicit and easiest to control, but header and body versioning are also quite common:

image

Here's a good summary of different best practices.

@brian-comply0
Copy link
Contributor Author

Body Versioning sounds like it introduces additional complexity for PUT and POST methods used for transmitting complete OSCAL documents. The OSCAL content could be in XML, JSON or YAML. The endpoints would need to require the content be wrapped as multi-part mime in order to include the syntax version as JSON.

I believe we should set this one aside and consider only URI Versioning and Header Versioning.

@brian-comply0
Copy link
Contributor Author

We will use Semantic Versioning for the version number, and URI versioning to specify the version of the API being used.

@brian-comply0
Copy link
Contributor Author

@mpemy's OpenAPI generation capability can now insert whatever version number the product owner specifies for a given release, and the supporting documentation cites the use of Semantic Versioning. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-consideration REST API endpoints should be considered as part of this task
Projects
None yet
Development

No branches or pull requests

3 participants