support multiple concurrent versions of generated service APIs #416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds
no-default-version
feature to the REST API generator, which enables specifying multiple versions of a given API. Prior to this change, users were unable to specify multiple versions in thefeatures
flag.This enables users to choose using pre-release endpoint APIs where strictly required to enable functionality, but use a released version for everything else via something like this:
azure_mgmt_addons = { default-features = false, features = ["package-2021-03-preview", "package-2021-03"] }
Additionally, this enables SDK developers to verify all of the generated versions can compile via:
cd services; cargo check --all-features
Prior to this change, multiple non-default versions had generated code that would not compile.
This PR is broken up into 4 checkins to enable easier reviewing:
NOTES:
azure-rest-api-specs
rev 694fe69245024447f8d3647be1da88e9ad942058cargo check --all-features
is exceedingly time consuming primarily due toazure_mgmt_network
which has 48 versions, made up of 14377 functions, 19621 structs, and 4953 enums. This PR does not enable that by default in CICD, but perhaps that is something to discuss in the future.