Skip to content

Renamed no-default-version feature to no-default-tag & expanded tag documentation #711

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

Merged
merged 7 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions services/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [#675](https://github.com/Azure/azure-sdk-for-rust/pull/675) use Basic Information tag for default version
- [#634](https://github.com/Azure/azure-sdk-for-rust/issues/634) limit docs.rs to 5 API tags
- [#632](https://github.com/Azure/azure-sdk-for-rust/issues/632) add links & README.md for services
- Renamed `no-default-version` feature to `no-default-tag` & expanded tag documentation

# 0.1 (2022-01)

Expand Down
6 changes: 3 additions & 3 deletions services/autorust/codegen/src/cargo_toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ features = [{}]
default = ["{}", "enable_reqwest"]
enable_reqwest = ["azure_core/enable_reqwest"]
enable_reqwest_rustls = ["azure_core/enable_reqwest_rustls"]
no-default-version = []
no-default-tag = []
"#,
crate_name, crate_name, docs_rs_features, default_feature
)
Expand All @@ -88,7 +88,7 @@ pub fn get_default_tag<'a>(tags: &[&'a Tag], default_tag: Option<&str>) -> &'a T
}

const MAX_DOCS_RS_FEATURES: usize = 4;
const NO_DEFAULT_VERSION: &str = "no-default-version";
const NO_DEFAULT_TAG: &str = "no-default-tag";

/// Get a list of features to document at docs.rs in addition the default
fn docs_rs_features(tags: &[&Tag], default_feature: &str) -> Vec<String> {
Expand All @@ -104,6 +104,6 @@ fn docs_rs_features(tags: &[&Tag], default_feature: &str) -> Vec<String> {
})
.collect();
features.truncate(MAX_DOCS_RS_FEATURES);
features.insert(0, NO_DEFAULT_VERSION.to_owned());
features.insert(0, NO_DEFAULT_TAG.to_owned());
features
}
2 changes: 1 addition & 1 deletion services/autorust/codegen/src/lib_rs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn create_body(tags: &[&Tag]) -> Result<TokenStream> {
cfgs.extend(quote! {
#[cfg(feature = #feature_name)]
pub mod #mod_name;
#[cfg(all(feature = #feature_name, not(feature = "no-default-version")))]
#[cfg(all(feature = #feature_name, not(feature = "no-default-tag")))]
pub use #mod_name::{models, operations, operations::Client, operations::ClientBuilder, operations::Error};
});
}
Expand Down
8 changes: 5 additions & 3 deletions services/autorust/codegen/templates/readme.md.jinja
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# {{ crate_name }} crate

The is an [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate that is generated from the Azure REST API specifications listed in:
This is a generated [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate from the Azure REST API specifications listed in:

{{ readme_url }}

The default `Tag` is `{{default_tag.name()}}`.
To get started with these generated service crates, see the [examples](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/README.md#examples).

The following `Tag`s are available:
The default tag is `{{default_tag.name()}}`.

The following [tags](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/tags.md) are available:
{% for tag in tags %}
- `{{tag.name()}}` has {{self.operation_total(tag)}} operations from {{self.api_version_total(tag)}} API versions: {{self.api_versions(tag)}}. Use crate feature `{{tag.rust_feature_name()}}` to enable. The operations will be in the `{{tag.rust_mod_name()}}` module.
{%- endfor -%}
4 changes: 2 additions & 2 deletions services/mgmt/activedirectory/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions services/mgmt/activedirectory/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# azure_mgmt_activedirectory crate

The is an [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate that is generated from the Azure REST API specifications listed in:
This is a generated [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate from the Azure REST API specifications listed in:

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/azureactivedirectory/resource-manager/readme.md

The default `Tag` is `package-2020-03`.
To get started with these generated service crates, see the [examples](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/README.md#examples).

The following `Tag`s are available:
The default tag is `package-2020-03`.

The following [tags](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/tags.md) are available:

- `package-preview-2017-04` has 6 operations from 1 API versions: `2017-04-01-preview`. Use crate feature `package-preview-2017-04` to enable. The operations will be in the `package_preview_2017_04` module.
- `package-preview-2020-03` has 8 operations from 1 API versions: `2020-03-01-preview`. Use crate feature `package-preview-2020-03` to enable. The operations will be in the `package_preview_2020_03` module.
Expand Down
8 changes: 4 additions & 4 deletions services/mgmt/activedirectory/src/lib.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions services/mgmt/addons/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions services/mgmt/addons/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# azure_mgmt_addons crate

The is an [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate that is generated from the Azure REST API specifications listed in:
This is a generated [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate from the Azure REST API specifications listed in:

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/addons/resource-manager/readme.md

The default `Tag` is `package-2018-03`.
To get started with these generated service crates, see the [examples](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/README.md#examples).

The following `Tag`s are available:
The default tag is `package-2018-03`.

The following [tags](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/tags.md) are available:

- `package-2018-03` has 5 operations from 1 API versions: `2018-03-01`. Use crate feature `package-2018-03` to enable. The operations will be in the `package_2018_03` module.
- `package-2017-05` has 5 operations from 1 API versions: `2017-05-15`. Use crate feature `package-2017-05` to enable. The operations will be in the `package_2017_05` module.
4 changes: 2 additions & 2 deletions services/mgmt/addons/src/lib.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions services/mgmt/adhybridhealthservice/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions services/mgmt/adhybridhealthservice/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# azure_mgmt_adhybridhealthservice crate

The is an [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate that is generated from the Azure REST API specifications listed in:
This is a generated [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate from the Azure REST API specifications listed in:

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/adhybridhealthservice/resource-manager/readme.md

The default `Tag` is `package-2014-01`.
To get started with these generated service crates, see the [examples](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/README.md#examples).

The following `Tag`s are available:
The default tag is `package-2014-01`.

The following [tags](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/tags.md) are available:

- `package-2014-01` has 77 operations from 1 API versions: `2014-01-01`. Use crate feature `package-2014-01` to enable. The operations will be in the `package_2014_01` module.
2 changes: 1 addition & 1 deletion services/mgmt/adhybridhealthservice/src/lib.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions services/mgmt/adp/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions services/mgmt/adp/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# azure_mgmt_adp crate

The is an [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate that is generated from the Azure REST API specifications listed in:
This is a generated [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate from the Azure REST API specifications listed in:

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/adp/resource-manager/readme.md

The default `Tag` is `package-2021-11-01-preview`.
To get started with these generated service crates, see the [examples](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/README.md#examples).

The following `Tag`s are available:
The default tag is `package-2021-11-01-preview`.

The following [tags](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/tags.md) are available:

- `package-2020-07-01-preview` has 12 operations from 1 API versions: `2020-07-01-preview`. Use crate feature `package-2020-07-01-preview` to enable. The operations will be in the `package_2020_07_01_preview` module.
- `package-2021-02-01-preview` has 13 operations from 1 API versions: `2021-02-01-preview`. Use crate feature `package-2021-02-01-preview` to enable. The operations will be in the `package_2021_02_01_preview` module.
Expand Down
6 changes: 3 additions & 3 deletions services/mgmt/adp/src/lib.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions services/mgmt/advisor/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions services/mgmt/advisor/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# azure_mgmt_advisor crate

The is an [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate that is generated from the Azure REST API specifications listed in:
This is a generated [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate from the Azure REST API specifications listed in:

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/advisor/resource-manager/readme.md

The default `Tag` is `package-2020-01`.
To get started with these generated service crates, see the [examples](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/README.md#examples).

The following `Tag`s are available:
The default tag is `package-2020-01`.

The following [tags](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/tags.md) are available:

- `package-2022-02-preview` has 2 operations from 1 API versions: `2022-02-01-preview`. Use crate feature `package-2022-02-preview` to enable. The operations will be in the `package_2022_02_preview` module.
- `package-2020-07-preview` has 3 operations from 1 API versions: `2020-07-01-preview`. Use crate feature `package-2020-07-preview` to enable. The operations will be in the `package_2020_07_preview` module.
- `package-2020-01` has 15 operations from 1 API versions: `2020-01-01`. Use crate feature `package-2020-01` to enable. The operations will be in the `package_2020_01` module.
- `package-2017-04` has 15 operations from 1 API versions: `2017-04-19`. Use crate feature `package-2017-04` to enable. The operations will be in the `package_2017_04` module.
Expand Down
12 changes: 6 additions & 6 deletions services/mgmt/advisor/src/lib.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions services/mgmt/agrifood/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions services/mgmt/agrifood/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# azure_mgmt_agrifood crate

The is an [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate that is generated from the Azure REST API specifications listed in:
This is a generated [Azure SDK for Rust](https://github.com/Azure/azure-sdk-for-rust) crate from the Azure REST API specifications listed in:

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/agrifood/resource-manager/readme.md

The default `Tag` is `package-2020-05-12-preview`.
To get started with these generated service crates, see the [examples](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/README.md#examples).

The following `Tag`s are available:
The default tag is `package-2020-05-12-preview`.

The following [tags](https://github.com/Azure/azure-sdk-for-rust/blob/main/services/tags.md) are available:

- `package-2020-05-12-preview` has 15 operations from 1 API versions: `2020-05-12-preview`. Use crate feature `package-2020-05-12-preview` to enable. The operations will be in the `package_2020_05_12_preview` module.
Loading