Skip to content

Commit

Permalink
Upgrade to TypeSpec 0.62.0 (Azure#31439)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin authored Nov 6, 2024
1 parent 7dfd170 commit 0410d40
Show file tree
Hide file tree
Showing 51 changed files with 842 additions and 489 deletions.
1,130 changes: 710 additions & 420 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
"name": "azure-rest-api-specs",
"devDependencies": {
"@azure-tools/typespec-apiview": "0.4.9",
"@azure-tools/typespec-autorest": "0.47.0",
"@azure-tools/typespec-azure-core": "0.47.0",
"@azure-tools/typespec-azure-portal-core": "0.47.0",
"@azure-tools/typespec-azure-resource-manager": "0.47.1",
"@azure-tools/typespec-azure-rulesets": "0.47.0",
"@azure-tools/typespec-autorest": "0.48.0",
"@azure-tools/typespec-azure-core": "0.48.0",
"@azure-tools/typespec-azure-portal-core": "0.48.0",
"@azure-tools/typespec-azure-resource-manager": "0.48.0",
"@azure-tools/typespec-azure-rulesets": "0.48.0",
"@azure-tools/typespec-client-generator-cli": "0.13.3",
"@azure-tools/typespec-client-generator-core": "0.47.4",
"@azure-tools/typespec-client-generator-core": "0.48.0",
"@azure-tools/typespec-liftr-base": "0.4.0",
"@azure/avocado": "^0.9.1",
"@typespec/compiler": "0.61.2",
"@typespec/http": "0.61.0",
"@typespec/openapi": "0.61.0",
"@typespec/openapi3": "0.61.0",
"@typespec/rest": "0.61.0",
"@typespec/versioning": "0.61.0",
"@typespec/compiler": "0.62.0",
"@typespec/http": "0.62.0",
"@typespec/openapi": "0.62.0",
"@typespec/openapi3": "0.62.0",
"@typespec/rest": "0.62.0",
"@typespec/versioning": "0.62.0",
"azure-rest-api-specs-eng-tools": "file:eng/tools",
"oav": "^3.5.1",
"prettier": "~3.3.3",
Expand Down
1 change: 1 addition & 0 deletions specification/ai/Face/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ linter:
disable:
"@azure-tools/typespec-azure-core/operation-missing-api-version": "API version located in the host template"
"@azure-tools/typespec-azure-core/use-standard-operations": "Most of our operation doesn't fit standard ops"
"@azure-tools/typespec-azure-core/use-standard-names": "Most of our operation doesn't fit standard ops"
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace ClientForAzureHealthInsights;
interface RadiologyInsightsClient {
#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "Polling through operation-location"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "https://github.com/microsoft/typespec/issues/2037"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
inferRadiologyInsights is AzureHealthInsights.RadiologyInsights.createJob;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface RadiologyInsights {
@get
getJob is HealthInsightsOperations.ResourceRead<RadiologyInsightsJob>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
@summary("Create Radiology Insights job")
@tag("RadiologyInsights")
@doc("Creates a Radiology Insights job with the given request body.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface TrialMatcher {
@get
getJob is HealthInsightsOperations.ResourceRead<TrialMatcherJob>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
@summary("Create Trial Matcher job")
@tag("TrialMatcher")
@doc("Creates a Trial Matcher job with the given request body.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,7 @@ components:
nullable: true
description: The Unix timestamp, in seconds, representing when this failed.
incomplete_details:
oneOf:
allOf:
- $ref: '#/components/schemas/IncompleteRunDetails'
nullable: true
description: Details on why the run is incomplete. Will be `null` if the run is not incomplete.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ components:
We generally recommend altering this or temperature but not both.
default: 1
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used by this assistant.
Expand Down Expand Up @@ -1499,7 +1499,7 @@ components:
We generally recommend altering this or temperature but not both.
default: 1
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used by this assistant.
Expand Down Expand Up @@ -1805,12 +1805,12 @@ components:
nullable: true
description: The strategy to use for dropping messages as the context windows moves forward.
tool_choice:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiToolChoiceOption'
nullable: true
description: Controls whether or not and which tool is called by the model.
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: Specifies the format that the model must output.
Expand Down Expand Up @@ -1949,12 +1949,12 @@ components:
nullable: true
description: The strategy to use for dropping messages as the context windows moves forward.
tool_choice:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiToolChoiceOption'
nullable: true
description: Controls whether or not and which tool is called by the model.
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: Specifies the format that the model must output.
Expand Down Expand Up @@ -3656,7 +3656,7 @@ components:
nullable: true
description: The Unix timestamp, in seconds, representing when this failed.
incomplete_details:
oneOf:
allOf:
- $ref: '#/components/schemas/IncompleteRunDetails'
nullable: true
description: Details on why the run is incomplete. Will be `null` if the run is not incomplete.
Expand Down Expand Up @@ -3695,12 +3695,12 @@ components:
nullable: true
description: The strategy to use for dropping messages as the context windows moves forward.
tool_choice:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiToolChoiceOption'
nullable: true
description: Controls whether or not and which tool is called by the model.
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used in this run.
Expand Down Expand Up @@ -3841,7 +3841,7 @@ components:
We generally recommend altering this or temperature but not both.
default: 1
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used by this assistant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ components:
We generally recommend altering this or temperature but not both.
default: 1
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used by this assistant.
Expand Down Expand Up @@ -1507,7 +1507,7 @@ components:
We generally recommend altering this or temperature but not both.
default: 1
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used by this assistant.
Expand Down Expand Up @@ -1813,12 +1813,12 @@ components:
nullable: true
description: The strategy to use for dropping messages as the context windows moves forward.
tool_choice:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiToolChoiceOption'
nullable: true
description: Controls whether or not and which tool is called by the model.
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: Specifies the format that the model must output.
Expand Down Expand Up @@ -1962,12 +1962,12 @@ components:
nullable: true
description: The strategy to use for dropping messages as the context windows moves forward.
tool_choice:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiToolChoiceOption'
nullable: true
description: Controls whether or not and which tool is called by the model.
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: Specifies the format that the model must output.
Expand Down Expand Up @@ -3696,7 +3696,7 @@ components:
nullable: true
description: The Unix timestamp, in seconds, representing when this failed.
incomplete_details:
oneOf:
allOf:
- $ref: '#/components/schemas/IncompleteRunDetails'
nullable: true
description: Details on why the run is incomplete. Will be `null` if the run is not incomplete.
Expand Down Expand Up @@ -3735,12 +3735,12 @@ components:
nullable: true
description: The strategy to use for dropping messages as the context windows moves forward.
tool_choice:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiToolChoiceOption'
nullable: true
description: Controls whether or not and which tool is called by the model.
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used in this run.
Expand Down Expand Up @@ -3881,7 +3881,7 @@ components:
We generally recommend altering this or temperature but not both.
default: 1
response_format:
oneOf:
allOf:
- $ref: '#/components/schemas/AssistantsApiResponseFormatOption'
nullable: true
description: The response format of the tool calls used by this assistant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface Apis {
ListQueryParametersTrait<StandardListQueryParameters>
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Cannot model with standard operations"
@doc("List a collection of APIs across workspaces.")
@route("/apis")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ interface Environments {
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Cannot model with standard operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
@doc("List a collection of environments across workspaces.")
@route("/environments")
listAll is Azure.Core.Foundations.Operation<
Expand Down
8 changes: 4 additions & 4 deletions specification/appconfiguration/AppConfiguration/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ model KeyListResult {
items?: Key[];

@doc("The URI that can be used to request the next set of paged results.")
@nextLink
@Azure.Core.nextLink
`@nextLink`?: string;
}

Expand Down Expand Up @@ -162,7 +162,7 @@ model KeyValueListResult {
etag?: string;

@doc("The URI that can be used to request the next set of paged results.")
@nextLink
@Azure.Core.nextLink
`@nextLink`?: string;
}

Expand Down Expand Up @@ -207,7 +207,7 @@ model SnapshotListResult {
items?: Snapshot[];

@doc("The URI that can be used to request the next set of paged results.")
@nextLink
@Azure.Core.nextLink
`@nextLink`?: string;
}

Expand Down Expand Up @@ -304,7 +304,7 @@ model LabelListResult {
items?: Label[];

@doc("The URI that can be used to request the next set of paged results.")
@nextLink
@Azure.Core.nextLink
`@nextLink`?: string;
}

Expand Down
7 changes: 7 additions & 0 deletions specification/appconfiguration/AppConfiguration/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ alias AppConfigResponseHeaders = {
};

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
@summary("Gets a list of keys.")
@doc("Gets a list of keys.")
op getKeys is Foundations.ResourceList<
Expand Down Expand Up @@ -114,6 +115,7 @@ op checkKeys is appConfigOperation<
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
@summary("Gets a list of key-values.")
@doc("Gets a list of key-values.")
op getKeyValues is Foundations.ResourceList<
Expand Down Expand Up @@ -309,6 +311,7 @@ op getKeyValue is Foundations.ResourceOperation<
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
@summary("Creates a key-value.")
@doc("Creates a key-value.")
@route("/kv/{key}")
Expand Down Expand Up @@ -438,6 +441,7 @@ op checkKeyValue is appConfigOperation<
OkResponse & AppConfigResponseHeaders
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract"
@summary("Gets a list of key-value snapshots.")
@doc("Gets a list of key-value snapshots.")
Expand Down Expand Up @@ -651,6 +655,7 @@ op checkSnapshot is appConfigOperation<
}
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract"
@summary("Gets a list of labels.")
@doc("Gets a list of labels.")
Expand Down Expand Up @@ -723,6 +728,7 @@ op checkLabels is appConfigOperation<
}
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract"
@summary("Locks a key-value.")
@doc("Locks a key-value.")
Expand Down Expand Up @@ -795,6 +801,7 @@ op deleteLock is appConfigOperation<
contentTypeHeader<"application/vnd.microsoft.appconfig.kv+json">
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Legacy name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Pre-existing API contract"
@summary("Gets a list of key-value revisions.")
@doc("Gets a list of key-value revisions.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ model VirtualMachineScaleSetListResult {
value: Array<VirtualMachineScaleSet>;

@doc("The link to the next page of items")
@nextLink
@Azure.Core.nextLink
nextLink?: url;
}
Loading

0 comments on commit 0410d40

Please sign in to comment.