Skip to content

Commit

Permalink
enable stream-style for mgmt, prepare release 4.1.31 (#2824)
Browse files Browse the repository at this point in the history
* enable stream-style-serialization for mgmt

* bump version

* disable stream-style for some RPs

* address comments
  • Loading branch information
XiaofeiCao authored Jun 19, 2024
1 parent 6afa9ae commit 6627e64
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions fluent-tests/Initialize-Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ $job = @(
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS ./swagger/readme.network.md --namespace=com.azure.mgmttest.network",

# error response that is subclass of ManagementException
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS ./swagger/readme.appservice.md --namespace=com.azure.mgmttest.appservice",
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS ./swagger/readme.appservice.md --namespace=com.azure.mgmttest.appservice --stream-style-serialization=false",

# multiple inheritance
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json --namespace=com.azure.mgmttest.cosmos",
Expand All @@ -91,7 +91,7 @@ $job = @(
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/afdx.json --namespace=com.azure.mgmttest.afdx",

# nested x-ms-flatten from superclass in ExtendedProduct
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/Product.json --namespace=com.azure.mgmttest.azurestack",
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/azurestack/resource-manager/Microsoft.AzureStack/preview/2020-06-01-preview/Product.json --namespace=com.azure.mgmttest.azurestack --stream-style-serialization=false",

# conflict property name from 2 x-ms-flatten in LabDetails and LabProperties
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/education.json --namespace=com.azure.mgmttest.education",
Expand All @@ -100,7 +100,7 @@ $job = @(
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/device.json --namespace=com.azure.mgmttest.hybridnetwork",

# flatten the empty model which has non-empty parent model
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/dataCollectionRules_API.json --namespace=com.azure.mgmttest.monitor",
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/dataCollectionRules_API.json --namespace=com.azure.mgmttest.monitor --stream-style-serialization=false",

# extract systemData from Resource
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/29f3116d3ce31f2125d1e2cfb92d6511fcb01c41/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json --java.namespace=com.azure.mgmttest.postgresqlhsc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public void testWebException() throws IOException {
Assertions.assertNotNull(webError.getDetails());
Assertions.assertEquals(1, webError.getDetails().size());
Assertions.assertEquals("InnerError", webError.getDetails().get(0).getCode());
Assertions.assertEquals("Deployment error.", webError.getInnererror());

GraphErrorException graphException = new GraphErrorException("mock graph error", null);
Assertions.assertFalse((Object) graphException instanceof ManagementException);
Expand Down
2 changes: 1 addition & 1 deletion fluentgen/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ required-parameter-client-methods: true
client-flattened-annotation-target: none
null-byte-array-maps-to-empty-array: true
graal-vm-config: true
stream-style-serialization: false
stream-style-serialization: true
```
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/java",
"version": "4.1.30",
"version": "4.1.31",
"description": "The Java extension for classic generators in AutoRest.",
"scripts": {
"autorest": "autorest",
Expand Down

0 comments on commit 6627e64

Please sign in to comment.