Skip to content

Commit fea5b88

Browse files
authored
Make Azure.ResourceManager.PostgreSql AOT-compatible (#51739)
1 parent e7d4c71 commit fea5b88

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

sdk/postgresql/Azure.ResourceManager.PostgreSql/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 1.4.0-beta.1 (Unreleased)
3+
## 1.3.1 (2025-08-06)
44

55
### Features Added
66

7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
7+
- Make `Azure.ResourceManager.PostgreSql` AOT-compatible
128

139
## 1.3.0 (2025-06-25)
1410

sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>1.4.0-beta.1</Version>
3+
<Version>1.3.1</Version>
44
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
55
<ApiCompatVersion>1.3.0</ApiCompatVersion>
66
<PackageId>Azure.ResourceManager.PostgreSql</PackageId>

sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Custom/Models/PostgreSqlServerData.Serialization.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System;
77
using System.ClientModel.Primitives;
88
using System.Collections.Generic;
9+
using System.Text;
910
using System.Text.Json;
1011
using Azure.Core;
1112
using Azure.ResourceManager.Models;
@@ -57,7 +58,7 @@ internal static PostgreSqlServerData DeserializePostgreSqlServerData(JsonElement
5758
property.ThrowNonNullablePropertyIsNull();
5859
continue;
5960
}
60-
identity = JsonSerializer.Deserialize<ManagedServiceIdentity>(property.Value.ToString());
61+
identity = ModelReaderWriter.Read<ManagedServiceIdentity>(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerPostgreSqlContext.Default);
6162
continue;
6263
}
6364
if (property.NameEquals("sku"u8))
@@ -112,7 +113,7 @@ internal static PostgreSqlServerData DeserializePostgreSqlServerData(JsonElement
112113
property.ThrowNonNullablePropertyIsNull();
113114
continue;
114115
}
115-
systemData = JsonSerializer.Deserialize<SystemData>(property.Value.ToString());
116+
systemData = ModelReaderWriter.Read<SystemData>(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerPostgreSqlContext.Default);
116117
continue;
117118
}
118119
if (property.NameEquals("properties"u8))

sdk/postgresql/ci.mgmt.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ extends:
2121
Artifacts:
2222
- name: Azure.ResourceManager.PostgreSql
2323
safeName: AzureResourceManagerPostgreSql
24+
CheckAOTCompat: true
25+
AOTTestInputs:
26+
- ArtifactName: Azure.ResourceManager.PostgreSql
27+
ExpectedWarningsFilepath: None

0 commit comments

Comments
 (0)