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

[AutoPR azure-resourcemanager-impactreporting]-generated-from-spec-gen-sdk - java-4628702 #44543

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions eng/automation/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ def sdk_automation_typespec(config: dict) -> List[dict]:

def sdk_automation_typespec_project(tsp_project: str, config: dict) -> dict:

# TODO(xiaofei) support changelog, etc
base_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
sdk_root = os.path.abspath(os.path.join(base_dir, SDK_ROOT))
spec_root = os.path.abspath(config["specFolder"])
Expand Down Expand Up @@ -272,14 +271,27 @@ def sdk_automation_typespec_project(tsp_project: str, config: dict) -> dict:
# compile
succeeded = compile_arm_package(sdk_root, module)
if succeeded:
logging.info("[Changelog] Start breaking change detection for SDK automation.")
breaking, changelog, breaking_change_items = compare_with_maven_package(
sdk_root,
GROUP_ID,
service,
get_latest_ga_version(GROUP_ID, module, stable_version),
current_version,
module,
module
)
logging.info("[Changelog] Complete breaking change detection for SDK automation.")
logging.info("[Changelog] Start generating changelog.")
compare_with_maven_package(
sdk_root,
GROUP_ID,
service,
get_latest_release_version(stable_version, current_version),
current_version,
module
)
update_changelog_version(sdk_root, output_folder, current_version)
logging.info("[Changelog] Complete generating changelog.")

# output
if sdk_folder and module and service:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.2 (2025-03-07)

### Features Added
- Azure Resource Manager Impact Reporting client library for Java. This package contains Microsoft Azure SDK for Impact Reporting Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Breaking Changes

### Bugs Fixed
#### `models.ImpactCategoryProperties` was modified

* `description()` was removed

### Features Added

#### `models.ImpactCategoryProperties` was modified

### Other Changes
* `descriptions()` was added

## 1.0.0-beta.1 (2025-02-19)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class ImpactCategoryProperties implements JsonSerializable<ImpactCa
/*
* Description of the category
*/
private String description;
private String descriptions;

/*
* The workloadImpact properties which are required when reporting with the impact category
Expand Down Expand Up @@ -77,12 +77,12 @@ public String parentCategoryId() {
}

/**
* Get the description property: Description of the category.
* Get the descriptions property: Description of the category.
*
* @return the description value.
* @return the descriptions value.
*/
public String description() {
return this.description;
public String descriptions() {
return this.descriptions;
}

/**
Expand Down Expand Up @@ -121,7 +121,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("categoryId", this.categoryId);
jsonWriter.writeStringField("parentCategoryId", this.parentCategoryId);
jsonWriter.writeStringField("description", this.description);
jsonWriter.writeStringField("descriptions", this.descriptions);
jsonWriter.writeArrayField("requiredImpactProperties", this.requiredImpactProperties,
(writer, element) -> writer.writeJson(element));
return jsonWriter.writeEndObject();
Expand Down Expand Up @@ -150,8 +150,8 @@ public static ImpactCategoryProperties fromJson(JsonReader jsonReader) throws IO
= ProvisioningState.fromString(reader.getString());
} else if ("parentCategoryId".equals(fieldName)) {
deserializedImpactCategoryProperties.parentCategoryId = reader.getString();
} else if ("description".equals(fieldName)) {
deserializedImpactCategoryProperties.description = reader.getString();
} else if ("descriptions".equals(fieldName)) {
deserializedImpactCategoryProperties.descriptions = reader.getString();
} else if ("requiredImpactProperties".equals(fieldName)) {
List<RequiredImpactProperties> requiredImpactProperties
= reader.readArray(reader1 -> RequiredImpactProperties.fromJson(reader1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class ImpactCategoriesGetWithResponseMockTests {
@Test
public void testGetWithResponse() throws Exception {
String responseStr
= "{\"properties\":{\"provisioningState\":\"Succeeded\",\"categoryId\":\"mnyyazt\",\"parentCategoryId\":\"twwrqp\",\"description\":\"dckzywbiexz\",\"requiredImpactProperties\":[{\"name\":\"ue\",\"allowedValues\":[\"bxu\"]},{\"name\":\"wbhqwal\",\"allowedValues\":[\"yoxa\",\"pdkzjancuxr\",\"d\",\"bavxbniwdjswzt\"]},{\"name\":\"dbpgnxytxhp\",\"allowedValues\":[\"zpfzabglc\",\"hxw\"]}]},\"id\":\"tyq\",\"name\":\"klbb\",\"type\":\"vplwzbhv\"}";
= "{\"properties\":{\"provisioningState\":\"Succeeded\",\"categoryId\":\"mnyyazt\",\"parentCategoryId\":\"twwrqp\",\"descriptions\":\"dckzywbiexz\",\"requiredImpactProperties\":[{\"name\":\"ue\",\"allowedValues\":[\"bxu\"]},{\"name\":\"wbhqwal\",\"allowedValues\":[\"yoxa\",\"pdkzjancuxr\",\"d\",\"bavxbniwdjswzt\"]},{\"name\":\"dbpgnxytxhp\",\"allowedValues\":[\"zpfzabglc\",\"hxw\"]}]},\"id\":\"tyq\",\"name\":\"klbb\",\"type\":\"vplwzbhv\"}";

HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
Expand All @@ -35,7 +35,7 @@ public void testGetWithResponse() throws Exception {

Assertions.assertEquals("mnyyazt", response.properties().categoryId());
Assertions.assertEquals("twwrqp", response.properties().parentCategoryId());
Assertions.assertEquals("dckzywbiexz", response.properties().description());
Assertions.assertEquals("dckzywbiexz", response.properties().descriptions());
Assertions.assertEquals("ue", response.properties().requiredImpactProperties().get(0).name());
Assertions.assertEquals("bxu", response.properties().requiredImpactProperties().get(0).allowedValues().get(0));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public final class ImpactCategoriesListMockTests {
@Test
public void testList() throws Exception {
String responseStr
= "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"categoryId\":\"zkd\",\"parentCategoryId\":\"lpvlopw\",\"description\":\"ighxpk\",\"requiredImpactProperties\":[{\"name\":\"baiuebbaumny\",\"allowedValues\":[\"edeojnabc\"]}]},\"id\":\"smtxpsieb\",\"name\":\"fhvpesaps\",\"type\":\"rdqmhjjdhtldwkyz\"}]}";
= "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"categoryId\":\"zkd\",\"parentCategoryId\":\"lpvlopw\",\"descriptions\":\"ighxpk\",\"requiredImpactProperties\":[{\"name\":\"baiuebbaumny\",\"allowedValues\":[\"edeojnabc\"]}]},\"id\":\"smtxpsieb\",\"name\":\"fhvpesaps\",\"type\":\"rdqmhjjdhtldwkyz\"}]}";

HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
Expand All @@ -36,7 +36,7 @@ public void testList() throws Exception {

Assertions.assertEquals("zkd", response.iterator().next().properties().categoryId());
Assertions.assertEquals("lpvlopw", response.iterator().next().properties().parentCategoryId());
Assertions.assertEquals("ighxpk", response.iterator().next().properties().description());
Assertions.assertEquals("ighxpk", response.iterator().next().properties().descriptions());
Assertions.assertEquals("baiuebbaumny",
response.iterator().next().properties().requiredImpactProperties().get(0).name());
Assertions.assertEquals("edeojnabc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public final class ImpactCategoryInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
ImpactCategoryInner model = BinaryData.fromString(
"{\"properties\":{\"provisioningState\":\"Failed\",\"categoryId\":\"sqrglssainq\",\"parentCategoryId\":\"wnzlljfmppeeb\",\"description\":\"gxsabkyq\",\"requiredImpactProperties\":[{\"name\":\"jitcjczdzevn\",\"allowedValues\":[\"rwpdappdsbdkvwrw\",\"feusnhut\"]},{\"name\":\"eltmrldhugjzzdat\",\"allowedValues\":[\"oc\",\"geablgphuticndvk\"]}]},\"id\":\"zwyiftyhxhur\",\"name\":\"k\",\"type\":\"tyxolniwpwc\"}")
"{\"properties\":{\"provisioningState\":\"Failed\",\"categoryId\":\"sqrglssainq\",\"parentCategoryId\":\"wnzlljfmppeeb\",\"descriptions\":\"gxsabkyq\",\"requiredImpactProperties\":[{\"name\":\"jitcjczdzevn\",\"allowedValues\":[\"rwpdappdsbdkvwrw\",\"feusnhut\"]},{\"name\":\"eltmrldhugjzzdat\",\"allowedValues\":[\"oc\",\"geablgphuticndvk\"]}]},\"id\":\"zwyiftyhxhur\",\"name\":\"k\",\"type\":\"tyxolniwpwc\"}")
.toObject(ImpactCategoryInner.class);
Assertions.assertEquals("sqrglssainq", model.properties().categoryId());
Assertions.assertEquals("wnzlljfmppeeb", model.properties().parentCategoryId());
Assertions.assertEquals("gxsabkyq", model.properties().description());
Assertions.assertEquals("gxsabkyq", model.properties().descriptions());
Assertions.assertEquals("jitcjczdzevn", model.properties().requiredImpactProperties().get(0).name());
Assertions.assertEquals("rwpdappdsbdkvwrw",
model.properties().requiredImpactProperties().get(0).allowedValues().get(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public final class ImpactCategoryListResultTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
ImpactCategoryListResult model = BinaryData.fromString(
"{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"categoryId\":\"yxwjkcp\",\"parentCategoryId\":\"nwbxgjvtbvpyssz\",\"description\":\"rujqg\",\"requiredImpactProperties\":[{\"name\":\"uouq\",\"allowedValues\":[\"wzwbnguitn\",\"uizga\"]},{\"name\":\"x\",\"allowedValues\":[\"zuckyfi\",\"rfidfvzwdz\",\"htymw\",\"sdkf\"]}]},\"id\":\"wxmnteiwao\",\"name\":\"vkmijcmmxdcuf\",\"type\":\"fsrpymzidnse\"},{\"properties\":{\"provisioningState\":\"Failed\",\"categoryId\":\"bzsgfyccsne\",\"parentCategoryId\":\"dwzjeiach\",\"description\":\"osfln\",\"requiredImpactProperties\":[{\"name\":\"fqpte\",\"allowedValues\":[\"zvypyqrimzinp\",\"swjdkirso\",\"dqxhcrmnohjtckwh\",\"soifiyipjxsqw\"]},{\"name\":\"gr\",\"allowedValues\":[\"norcjxvsnbyxqab\",\"mocpc\"]},{\"name\":\"shurzafbljjgpbto\",\"allowedValues\":[\"mkljavb\",\"idtqajzyu\",\"pku\",\"jkrlkhbzhfepg\"]}]},\"id\":\"qex\",\"name\":\"locx\",\"type\":\"c\"}],\"nextLink\":\"ierhhbcsglummaj\"}")
"{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"categoryId\":\"yxwjkcp\",\"parentCategoryId\":\"nwbxgjvtbvpyssz\",\"descriptions\":\"rujqg\",\"requiredImpactProperties\":[{\"name\":\"uouq\",\"allowedValues\":[\"wzwbnguitn\",\"uizga\"]},{\"name\":\"x\",\"allowedValues\":[\"zuckyfi\",\"rfidfvzwdz\",\"htymw\",\"sdkf\"]}]},\"id\":\"wxmnteiwao\",\"name\":\"vkmijcmmxdcuf\",\"type\":\"fsrpymzidnse\"},{\"properties\":{\"provisioningState\":\"Failed\",\"categoryId\":\"bzsgfyccsne\",\"parentCategoryId\":\"dwzjeiach\",\"descriptions\":\"osfln\",\"requiredImpactProperties\":[{\"name\":\"fqpte\",\"allowedValues\":[\"zvypyqrimzinp\",\"swjdkirso\",\"dqxhcrmnohjtckwh\",\"soifiyipjxsqw\"]},{\"name\":\"gr\",\"allowedValues\":[\"norcjxvsnbyxqab\",\"mocpc\"]},{\"name\":\"shurzafbljjgpbto\",\"allowedValues\":[\"mkljavb\",\"idtqajzyu\",\"pku\",\"jkrlkhbzhfepg\"]}]},\"id\":\"qex\",\"name\":\"locx\",\"type\":\"c\"}],\"nextLink\":\"ierhhbcsglummaj\"}")
.toObject(ImpactCategoryListResult.class);
Assertions.assertEquals("yxwjkcp", model.value().get(0).properties().categoryId());
Assertions.assertEquals("nwbxgjvtbvpyssz", model.value().get(0).properties().parentCategoryId());
Assertions.assertEquals("rujqg", model.value().get(0).properties().description());
Assertions.assertEquals("rujqg", model.value().get(0).properties().descriptions());
Assertions.assertEquals("uouq", model.value().get(0).properties().requiredImpactProperties().get(0).name());
Assertions.assertEquals("wzwbnguitn",
model.value().get(0).properties().requiredImpactProperties().get(0).allowedValues().get(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public final class ImpactCategoryPropertiesTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
ImpactCategoryProperties model = BinaryData.fromString(
"{\"provisioningState\":\"Failed\",\"categoryId\":\"fkgiawxk\",\"parentCategoryId\":\"ypl\",\"description\":\"kbasyypn\",\"requiredImpactProperties\":[{\"name\":\"sgcbac\",\"allowedValues\":[\"jkot\"]},{\"name\":\"nqgoulzndli\",\"allowedValues\":[\"qkgfgibma\",\"gakeqsr\"]},{\"name\":\"yb\",\"allowedValues\":[\"e\",\"qytbciq\",\"ouf\",\"mmnkzsmodmgl\"]},{\"name\":\"ugpbkw\",\"allowedValues\":[\"tduqktapspwgcuer\",\"umkdosvqwhbmd\",\"bbjfddgmbmbexp\",\"bhtqqrolfpfpsa\"]}]}")
"{\"provisioningState\":\"Failed\",\"categoryId\":\"fkgiawxk\",\"parentCategoryId\":\"ypl\",\"descriptions\":\"kbasyypn\",\"requiredImpactProperties\":[{\"name\":\"sgcbac\",\"allowedValues\":[\"jkot\"]},{\"name\":\"nqgoulzndli\",\"allowedValues\":[\"qkgfgibma\",\"gakeqsr\"]},{\"name\":\"yb\",\"allowedValues\":[\"e\",\"qytbciq\",\"ouf\",\"mmnkzsmodmgl\"]},{\"name\":\"ugpbkw\",\"allowedValues\":[\"tduqktapspwgcuer\",\"umkdosvqwhbmd\",\"bbjfddgmbmbexp\",\"bhtqqrolfpfpsa\"]}]}")
.toObject(ImpactCategoryProperties.class);
Assertions.assertEquals("fkgiawxk", model.categoryId());
Assertions.assertEquals("ypl", model.parentCategoryId());
Assertions.assertEquals("kbasyypn", model.description());
Assertions.assertEquals("kbasyypn", model.descriptions());
Assertions.assertEquals("sgcbac", model.requiredImpactProperties().get(0).name());
Assertions.assertEquals("jkot", model.requiredImpactProperties().get(0).allowedValues().get(0));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/impact/Impact.Management
commit: 2ed1d371e3519553cd527c1f9f2c316f9ed58f47
repo: Azure/azure-rest-api-specs
commit: 9e61d8f4dd885744dab9a2c3f0058113de0f21cf
repo: azure/azure-rest-api-specs
additionalDirectories: