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

[AppService] Add status code 202 and allow some properties to be empty #46960

Merged
merged 8 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 2 additions & 0 deletions sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs Fixed

- Add status code 202 and allow some properties to be empty. Issue at 'https://github.com/Azure/azure-sdk-for-net/issues/46854.

### Other Changes

## 1.3.0-beta.1 (2024-10-14)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
List<string> array = new List<string>();
Expand All @@ -145,7 +144,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
pfxBlob = property0.Value.GetBytesFromBase64("D");
Expand All @@ -170,7 +168,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
issueDate = property0.Value.GetDateTimeOffset("O");
Expand All @@ -180,7 +177,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
expirationDate = property0.Value.GetDateTimeOffset("O");
Expand All @@ -190,7 +186,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
thumbprintString = property0.Value.GetString();
Expand All @@ -200,7 +195,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
valid = property0.Value.GetBoolean();
Expand All @@ -210,7 +204,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
cerBlob = property0.Value.GetBytesFromBase64("D");
Expand All @@ -225,7 +218,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
hostingEnvironmentProfile = HostingEnvironmentProfile.DeserializeHostingEnvironmentProfile(property0.Value);
Expand All @@ -235,7 +227,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.GetString().Length == 0)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
keyVaultId = new ResourceIdentifier(property0.Value.GetString());
Expand All @@ -250,7 +241,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
keyVaultSecretStatus = property0.Value.GetString().ToKeyVaultSecretStatus();
Expand All @@ -260,7 +250,6 @@ internal static AppCertificateData DeserializeAppCertificateData(JsonElement ele
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
property0.ThrowNonNullablePropertyIsNull();
continue;
}
serverFarmId = new ResourceIdentifier(property0.Value.GetString());
Expand Down

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

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

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

21 changes: 21 additions & 0 deletions sdk/websites/Azure.ResourceManager.AppService/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -1052,4 +1052,25 @@ directive:
$.properties.properties.properties.threads.items = {
"$ref": "#/definitions/ProcessThreadProperties"
};
- from: Certificates.json
melina5656 marked this conversation as resolved.
Show resolved Hide resolved
where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'].put
transform: >
$["x-ms-long-running-operation"] = true;
$['responses'] = {
"200": {
"description": "OK.",
"schema": {
"$ref": "#/definitions/Certificate"
}
},
"202": {
"description": "OK.",
},
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public async Task CreateOrUpdate()

[TestCase]
[RecordedTest]
[Ignore("KeyVaultId is allowed to be null, and this test case will be adjusted according to the situation in the future")]
melina5656 marked this conversation as resolved.
Show resolved Hide resolved
public async Task CreateOrUpdateWithNullKeyVaultId()
{
// Call CreateOrUpdate on an existing certificate which returns empty string for keyVaultId
Expand Down