Skip to content

Commit 2cfedcb

Browse files
Fix some deprecations from valueof PR (#29126)
1 parent 91cbb69 commit 2cfedcb

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

specification/ai/OpenAI.Assistants/assistants/models.tsp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ model Assistant {
3737
instructions: string | null;
3838

3939
@doc("The collection of tools enabled for the assistant.")
40-
tools: ToolDefinition[] = [];
40+
tools: ToolDefinition[] = #[];
4141

4242
@encodedName("application/json", "file_ids")
4343
@doc("A list of attached file IDs, ordered by creation date in ascending order.")
44-
fileIds: string[] = [];
44+
fileIds: string[] = #[];
4545

4646
...RequiredNullableMetadata;
4747
}
@@ -66,11 +66,11 @@ model AssistantCreationOptions {
6666

6767
#suppress "@azure-tools/typespec-azure-core/no-nullable" "OpenAI uses explicit nullability, distinct from optionality"
6868
@doc("The collection of tools to enable for the new assistant.")
69-
tools?: ToolDefinition[] = [];
69+
tools?: ToolDefinition[] = #[];
7070

7171
@encodedName("application/json", "file_ids")
7272
@doc("A list of previously uploaded file IDs to attach to the assistant.")
73-
fileIds?: string[] = [];
73+
fileIds?: string[] = #[];
7474

7575
...OptionalNullableMetadata;
7676
}
@@ -98,11 +98,11 @@ model UpdateAssistantOptions {
9898
instructions?: string | null;
9999

100100
@doc("The modified collection of tools to enable for the assistant.")
101-
tools?: ToolDefinition[] = [];
101+
tools?: ToolDefinition[] = #[];
102102

103103
@encodedName("application/json", "file_ids")
104104
@doc("The modified list of previously uploaded fileIDs to attach to the assistant.")
105-
fileIds?: string[] = [];
105+
fileIds?: string[] = #[];
106106

107107
...OptionalNullableMetadata;
108108
}

specification/ai/OpenAI.Assistants/messages/models.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ model ThreadInitializationMessage {
1818
A list of file IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can
1919
access files.
2020
""")
21-
fileIds?: string[] = [];
21+
fileIds?: string[] = #[];
2222

2323
...OptionalNullableMetadata;
2424
}

specification/ai/OpenAI.Assistants/runs/models.tsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ model ThreadRun {
5151
instructions: string;
5252

5353
@doc("The overridden enabled tools used for this assistant thread run.")
54-
tools: ToolDefinition[] = [];
54+
tools: ToolDefinition[] = #[];
5555

5656
@encodedName("application/json", "file_ids")
5757
@doc("A list of attached file IDs, ordered by creation date in ascending order.")
58-
fileIds: string[] = [];
58+
fileIds: string[] = #[];
5959

6060
@encodedName("application/json", "created_at")
6161
@encode(DateTimeKnownEncoding.unixTimestamp, int32)

specification/communication/Communication.JobRouter/models.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ model ScoringRuleOptions {
882882
batchSize?: int32 = 20;
883883

884884
@doc("List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload.")
885-
scoringParameters?: ScoringRuleParameterSelector[] = [
885+
scoringParameters?: ScoringRuleParameterSelector[] = #[
886886
ScoringRuleParameterSelector.jobLabels,
887887
ScoringRuleParameterSelector.workerSelectors
888888
];

specification/iotoperationsmq/IoTOperationsMQ.Management/models/base.tsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ model CertManagerIssuerRef {
118118
@doc("SANs for certificate.")
119119
model SanForCert {
120120
@doc("DNS SANs.")
121-
dns: string[] = [];
121+
dns: string[] = #[];
122122

123123
@doc("IP address SANs.")
124-
ip: string[] = [];
124+
ip: string[] = #[];
125125
}
126126

127127
@doc("Mqtt Protocol types")

specification/iotoperationsmq/IoTOperationsMQ.Management/models/mqttbroker.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ model PrincipalDefinition {
679679
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "existing API"
680680
@doc("A list of key-value pairs that match the attributes of the clients. The attributes are case-sensitive and must match the attributes provided by the clients during authentication.")
681681
@OpenAPI.extension("x-ms-identifiers", [])
682-
attributes?: Record<string>[] = [];
682+
attributes?: Record<string>[] = #[];
683683

684684
@doc("A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection.")
685685
clientids?: string[];

0 commit comments

Comments
 (0)