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

Check lro sep #30738

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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: 1 addition & 1 deletion eng/pipelines/templates/steps/npm-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
- script: npm --version --loglevel info
displayName: npm --version

- script: npm ci
- script: npm install --no-package-lock --force
displayName: npm ci

- script: npm ls -a
Expand Down
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{

Check failure on line 1 in package.json

View workflow job for this annotation

GitHub Actions / Protected Files

File 'package.json' should only be updated by the Azure SDK team. If intentional, the PR may be merged by the Azure SDK team via bypassing the branch protections.
"name": "azure-rest-api-specs",
"devDependencies": {
"@azure-tools/typespec-apiview": "0.4.9",
"@azure-tools/typespec-autorest": "0.46.0",
"@azure-tools/typespec-azure-core": "0.46.0",
"@azure-tools/typespec-azure-portal-core": "0.46.0",
"@azure-tools/typespec-azure-resource-manager": "0.46.1",
"@azure-tools/typespec-azure-rulesets": "0.46.0",
"@azure-tools/typespec-client-generator-cli": "0.13.0",
"@azure-tools/typespec-client-generator-core": "0.46.0",
"@azure-tools/typespec-autorest": "next",
"@azure-tools/typespec-azure-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDE2NjU4MC9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-azure-core-0.47.0-pr-1416.20240924.11.tgz",
"@azure-tools/typespec-azure-portal-core": "next",
"@azure-tools/typespec-azure-resource-manager": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDE2NjU4MC9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-azure-resource-manager-0.47.0-pr-1416.20240924.11.tgz",
"@azure-tools/typespec-azure-rulesets": "next",
"@azure-tools/typespec-client-generator-core": "next",
"@azure-tools/typespec-liftr-base": "0.4.0",
"@azure/avocado": "^0.8.4",
"@typespec/compiler": "0.60.0",
"@typespec/http": "0.60.0",
"@typespec/openapi": "0.60.0",
"@typespec/openapi3": "0.60.0",
"@typespec/rest": "0.60.0",
"@typespec/versioning": "0.60.1",
"@typespec/compiler": "next",
"@typespec/http": "next",
"@typespec/openapi": "next",
"@typespec/openapi3": "next",
"@typespec/rest": "next",
"@typespec/versioning": "next",
"azure-rest-api-specs-eng-tools": "file:eng/tools",
"oav": "^3.3.7",
"prettier": "~3.3.3",
Expand Down
5 changes: 0 additions & 5 deletions specification/ai/OpenAI.Assistants/assistants/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ namespace Azure.AI.OpenAI.Assistants;
* @returns The new assistant instance.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations"
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" "not yet versioned"
@post
@added(ServiceApiVersions.v2024_02_15_preview)
Expand All @@ -35,7 +34,6 @@ op createAssistant(
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "mirrored API responds with a container"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations"
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" "not yet versioned"
@get
@added(ServiceApiVersions.v2024_02_15_preview)
Expand All @@ -49,7 +47,6 @@ op listAssistants(...OpenAIListRequestOptions): OpenAIPageableListOf<Assistant>;
* @returns The requested assistant instance.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations"
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" "not yet versioned"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "mirrored API name parity"
@get
Expand All @@ -64,7 +61,6 @@ op getAssistant(@path assistantId: string): Assistant;
* @returns The updated assistant instance.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations"
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" "not yet versioned"
@post
@route("/assistants/{assistantId}")
Expand All @@ -84,7 +80,6 @@ op updateAssistant(
* @returns Status information about the requested deletion operation.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations"
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" "not yet versioned"
@delete
@route("/assistants/{assistantId}")
Expand Down
17 changes: 17 additions & 0 deletions specification/apicenter/ApiCenter.Management/client.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import "@azure-tools/typespec-client-generator-core";
import "./main.tsp";
using Azure.ClientGenerator.Core;

namespace Microsoft.ApiCenter;

@@clientName(Apis.createOrUpdate::parameters.resource, "payload");
@@clientName(ApiDefinitions.createOrUpdate::parameters.resource, "payload");
@@clientName(ApiVersions.createOrUpdate::parameters.resource, "payload");
@@clientName(Deployments.createOrUpdate::parameters.resource, "payload");
@@clientName(Environments.createOrUpdate::parameters.resource, "payload");
@@clientName(MetadataSchemas.createOrUpdate::parameters.resource, "payload");
@@clientName(Services.update::parameters.properties, "payload");
@@clientName(Workspaces.createOrUpdate::parameters.resource, "payload");
@@clientName(ApiDefinitions.importSpecification::parameters.body, "payload");
@@clientName(ApiDefinitions.exportSpecification::parameters.body, "payload");
@@clientName(Services.exportMetadataSchema::parameters.body, "payload");
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,7 @@ interface AzureLargeInstances {
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "Template for optional body"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - migrate to LRO apis"
@autoRoute
@OpenAPI.extension("x-ms-long-running-operation", true)
@OpenAPI.extension(
"x-ms-long-running-operation-options",
{
`final-state-via`: "location",
}
)
@armResourceAction(TResource)
@post
op ArmResourceActionNoBody<
Expand Down
13 changes: 4 additions & 9 deletions specification/containerservice/Fleet.Management/fleet.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ interface Fleets {
#suppress "@azure-tools/typespec-providerhub/non-breaking-versioning" "Actual breaking change"
@sharedRoute
@removed(Versions.v2023_06_15_preview)
update is ArmCustomPatchSync<
@renamedFrom(Versions.v2023_06_15_preview, "update")
updateSync is ArmCustomPatchSync<
Fleet,
FleetPatch,
Azure.ResourceManager.Foundations.BaseParameters<Fleet> &
Expand All @@ -210,15 +211,9 @@ interface Fleets {

#suppress "@azure-tools/typespec-azure-core/no-openapi" "Use operationId to keep same name as deprecated sync operation"
@added(Versions.v2023_06_15_preview)
@operationId("Fleets_Update")
@extension(
"x-ms-long-running-operation-options",
{
`final-state-via`: "original-uri",
}
)
@finalOperation(Fleets.get)
@sharedRoute
updateAsync is ArmCustomPatchAsync<
update is ArmCustomPatchAsync<
Fleet,
FleetPatch,
Azure.ResourceManager.Foundations.BaseParameters<Fleet> &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,7 @@ interface FleetMembers {
@sharedRoute
@added(Versions.v2023_06_15_preview)
@operationId("FleetMembers_Update")
@extension(
"x-ms-long-running-operation-options",
{
`final-state-via`: "original-uri",
}
)
@finalOperation(FleetMembers.get)
updateAsync is ArmCustomPatchAsync<
FleetMember,
Azure.ResourceManager.Foundations.ResourceUpdateModel<
Expand Down
7 changes: 0 additions & 7 deletions specification/containerservice/Fleet.Management/helpers.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ op FleetCustomPatchSync<
#suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - TODO migrate to LRO apis"
@autoRoute
@doc("Create a {name}", TResource)
@extension("x-ms-long-running-operation", true)
@extension(
"x-ms-long-running-operation-options",
{
`final-state-via`: "azure-async-operation",
}
)
@armResourceCreateOrUpdate(TResource)
@put
op FleetArmResourceCreateOrUpdateAsync<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ interface Dataflow {
get is ArmResourceRead<DataflowResource>;
createOrUpdate is ArmResourceCreateOrUpdateAsync<DataflowResource>;
delete is ArmResourceDeleteWithoutOkAsync<DataflowResource>;
#suppress "@azure-tools/typespec-azure-core/no-openapi" "For backward compatibility"
@operationId("Dataflow_ListByProfileResource")
listByResourceGroup is ArmResourceListByParent<DataflowResource>;
listByProfileResource is ArmResourceListByParent<DataflowResource>;
}

// /instance/dataflowEndpoints resource Operations
Expand Down
4 changes: 2 additions & 2 deletions specification/loadtestservice/LoadTestService/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ interface TestRunOperations {
listMetrics is LoadTestRun.listMetrics;
listTestRuns is LoadTestRun.listTestRuns;
@clientName("stopTestRun", "javascript,python,java,csharp,go")
stop is LoadTestRun.stop;
stop is LoadTestRun.stopTestRun;
}

@client({
Expand All @@ -79,5 +79,5 @@ interface TestProfileRunOperations {
getTestProfileRun is TestProfileRunAdministration.getTestProfileRun;
listTestProfileRuns is TestProfileRunAdministration.listTestProfileRuns;
@clientName("stopTestProfileRun", "javascript,python,java,csharp,go")
stop is TestProfileRunAdministration.stop;
stop is TestProfileRunAdministration.stopTestProfileRun;
}
15 changes: 9 additions & 6 deletions specification/loadtestservice/LoadTestService/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,15 @@ interface LoadTestRun {
@doc("Get test run file by file name.")
getTestRunFile is StandardResourceOperations.ResourceRead<TestRunFileInfo>;

#suppress "@azure-tools/typespec-azure-core/no-openapi"
@summary("Stop test run by test run Id.")
@doc("Stop test run by test run Id.")
@operationId("LoadTestRun_StopTestRun")
stop is StandardResourceOperations.ResourceAction<TestRun, {}, TestRun, {}>;
@action("stop")
stopTestRun is StandardResourceOperations.ResourceAction<
TestRun,
{},
TestRun,
{}
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@summary("List the metric namespaces for a load test run.")
Expand Down Expand Up @@ -490,12 +494,11 @@ interface TestProfileRunAdministration {
@added(APIVersions.v2024_05_01_preview)
deleteTestProfileRun is StandardResourceOperations.ResourceDelete<TestProfileRun>;

#suppress "@azure-tools/typespec-azure-core/no-openapi"
@summary("Stop test profile run.")
@doc("Stop test profile run for the given test profile run Id.")
@operationId("TestProfileRunAdministration_StopTestProfileRun")
@added(APIVersions.v2024_05_01_preview)
stop is StandardResourceOperations.ResourceAction<
@action("stop")
stopTestProfileRun is StandardResourceOperations.ResourceAction<
TestProfileRun,
{},
TestProfileRun,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,7 @@ interface OracleChildResource<

@armResourceOperations
interface ListActions {
#suppress "@azure-tools/typespec-azure-core/no-openapi" "DO NOT COPY - TODO migrate to LRO apis"
@doc("Generic Async Get operation")
@extension(
"x-ms-long-running-operation-options",
{
`final-state-via`: "location",
}
)
@autoRoute
@armResourceAction(TResource)
@post
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,11 @@ using OpenAPI;
namespace Microsoft.AzureTerraform;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "Cannot use @armResourceOperations decorator here, the auto-generated routes do not match feature requirements"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "TODO: migrate to LRO concepts DO NOT USE x-ms-long-running-operation-options"
@doc("Exports the Terraform configuration of the specified resource(s).")
@route("/subscriptions/{subscriptionId}/providers/Microsoft.AzureTerraform/exportTerraform")
@post
@tag("ExportTerraform")
@extension(
"x-ms-long-running-operation-options",
{
`final-state-via`: "azure-async-operation",
`final-state-schema`: "#/definitions/OperationStatus",
}
)
@Azure.Core.useFinalStateVia("azure-async-operation")
op exportTerraform(
...ApiVersionParameter,
...SubscriptionIdParameter,
Expand All @@ -33,7 +26,12 @@ op exportTerraform(
exportParameter: BaseExportModel,
): ArmAcceptedLroResponse<
"Export request accepted.",
ArmCombinedLroHeaders & Azure.Core.Foundations.RetryAfterHeader
Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader<
UrlValue = ResourceLocation<OperationStatus>,
FinalResult = OperationStatus
> &
ArmLroLocationHeader<FinalResult = OperationStatus>
> | ErrorResponse;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "Cannot use @armResourceOperations decorator here, the auto-generated routes do not match feature requirements"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ options:
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/export.json"
emit-lro-options: "all"
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/resource-manager"
Loading