Skip to content

Commit

Permalink
Suppress use standard names rule that didn't trigger for some specs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin authored Nov 1, 2024
1 parent 4a34315 commit fa2f8bd
Show file tree
Hide file tree
Showing 37 changed files with 70 additions and 7 deletions.
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 @@ -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
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 @@ -12,6 +12,8 @@ emit:
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/data-plane"
disable:
"@azure-tools/typespec-azure-core/operation-missing-api-version": "Not using standard versioning"
options:
"@azure-tools/typespec-autorest":
azure-resource-provider-folder: "data-plane"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ interface ConversationalAnalysisAuthoring {
* Gets the detailed results of the evaluation for a trained model. This includes
* the raw inference results for the data included in the evaluation process.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
getModelEvaluationResults is languageOperations.ResourceList<
ConversationalAnalysisAuthoringUtteranceEvaluationResult,
ListQueryParametersTrait<StandardListQueryParameters &
Expand Down Expand Up @@ -699,6 +700,7 @@ interface ConversationalAnalysisAuthoring {
* returns deployments belonging to projects owned by other resources.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@route("/authoring/analyze-conversations/projects/global/deployments/resources")
@get
@added(Versions.v2023_04_15_preview)
Expand Down Expand Up @@ -816,6 +818,7 @@ interface ConversationalAnalysisAuthoring {
* Lists the support training config version for a given project type.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@route("/authoring/analyze-conversations/projects/global/training-config-versions")
@get
listTrainingConfigVersions is Azure.Core.Foundations.Operation<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ alias languageOperations = ResourceOperations<ServiceTraits, ErrorResponse>;

/** Get the status of a document analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. */
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Get analysis status and results")
op analyzeDocumentsJobStatus is languageOperations.ResourceRead<
AnalyzeDocumentsJobState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ interface TextAnalysisAuthoring {
* Gets the detailed results of the evaluation for a trained model. This includes
* the raw inference results for the data included in the evaluation process.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
getModelEvaluationResults is languageOperations.ResourceList<
TextAnalysisAuthoringDocumentEvaluationResult,
ListQueryParametersTrait<StandardListQueryParameters &
Expand Down Expand Up @@ -746,6 +747,7 @@ interface TextAnalysisAuthoring {
/**
* Lists the supported languages.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
getSupportedLanguages is languageOperations.ResourceList<
TextAnalysisAuthoringSupportedLanguage,
ListQueryParametersTrait<ProjectKindQueryParameter &
Expand All @@ -756,6 +758,7 @@ interface TextAnalysisAuthoring {
* Lists the supported prebuilt entities that can be used while creating composed
* entities.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@added(Versions.v2023_04_15_preview)
getSupportedPrebuiltEntities is languageOperations.ResourceList<
TextAnalysisAuthoringPrebuiltEntity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ op analyzeText is RpcOperation<

/** Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. */
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Get analysis status and results")
op analyzeTextJobStatus is languageOperations.ResourceRead<
AnalyzeTextJobState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ op analyzeConversations is RpcOperation<
>;

/** Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. */
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@added(Versions.v2023_04_01)
@summary("Get analysis status and results")
op analyzeConversationsJobStatus is languageOperations.ResourceRead<
Expand Down
2 changes: 2 additions & 0 deletions specification/cognitiveservices/OpenAI.Inference/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ interface OpenAIClient {

getEmbeddings is Azure.OpenAI.getEmbeddings;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
listFiles is Azure.OpenAI.listFiles;

Expand All @@ -58,6 +59,7 @@ interface OpenAIClient {
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
getFileContent is Azure.OpenAI.getFileContent;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "not yet an Azure operation"
listBatches is Azure.OpenAI.listBatches;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ using TypeSpec.Versioning;
namespace ClientForAcsJobRouter;

// Your customizations here
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "JobRouterAdministrationClient",
service: AzureCommunicationRoutingService,
Expand Down Expand Up @@ -66,6 +67,7 @@ interface JobRouterAdministrationRestClient {
deleteQueue is AzureCommunicationRoutingService.JobRouterAdministrationOperations.deleteQueue;
}

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "JobRouterClient",
service: AzureCommunicationRoutingService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.Versioning;

#suppress "@azure-tools/typespec-azure-core/auth-required" "!!FIXME!!"
@service({
title: "Azure Communication Routing Service",
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ alias GetOperations = Azure.Core.ResourceOperations<GetOperationTraits>;
alias PatchOperations = Azure.Core.ResourceOperations<PatchOperationTraits>;

interface JobRouterAdministrationOperations {
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Creates or updates a classification policy.")
@doc("Creates or updates a classification policy.")
upsertClassificationPolicy is PatchOperations.ResourceCreateOrUpdate<ClassificationPolicy>;
Expand All @@ -45,6 +46,7 @@ interface JobRouterAdministrationOperations {
ListClassificationPoliciesQueryParams
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Creates or updates a distribution policy.")
@doc("Creates or updates a distribution policy.")
upsertDistributionPolicy is PatchOperations.ResourceCreateOrUpdate<DistributionPolicy>;
Expand All @@ -64,6 +66,7 @@ interface JobRouterAdministrationOperations {
ListDistributionPoliciesQueryParams
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Creates or updates a exception policy.")
@doc("Creates or updates a exception policy.")
upsertExceptionPolicy is PatchOperations.ResourceCreateOrUpdate<ExceptionPolicy>;
Expand All @@ -82,7 +85,7 @@ interface JobRouterAdministrationOperations {
ExceptionPolicy,
ListExceptionPoliciesQueryParams
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Creates or updates a queue.")
@doc("Creates or updates a queue.")
upsertQueue is PatchOperations.ResourceCreateOrUpdate<RouterQueue>;
Expand All @@ -101,6 +104,7 @@ interface JobRouterAdministrationOperations {
}

interface JobRouterOperations {
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Creates or updates a router job.")
@doc("Creates or updates a router job.")
upsertJob is PatchOperations.ResourceCreateOrUpdate<RouterJob>;
Expand Down Expand Up @@ -228,6 +232,7 @@ interface JobRouterOperations {
RouterQueueStatistics
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Creates or updates a worker.")
@doc("Creates or updates a worker.")
upsertWorker is PatchOperations.ResourceCreateOrUpdate<RouterWorker>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace ClientForAcsMessages;
})
interface NotificationMessagesClient
extends Azure.Communication.MessagesService.NotificationMessagesOperations {
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@access(Access.internal, "csharp")
@clientName("downloadMediaInternal", "csharp")
downloadMedia is Azure.Communication.MessagesService.StreamOperations.getMedia;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ op getEntryStatus is Foundations.Operation<
ServiceTraits
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@doc("Get the status of all entries operations")
@route("/operations")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "./recovery.tsp";
import "./service_state.tsp";
import "./transactions.tsp";

#suppress "@azure-tools/typespec-azure-core/auth-required" "!!FIXME!!"
@service({
title: "Managed CCF Governance",
})
Expand Down
2 changes: 2 additions & 0 deletions specification/devcenter/DevCenter/DevBox/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ interface DevBoxes {
@doc("Gets a Dev Box.")
getDevBoxByUser is StandardResourceOperations.ResourceRead<DevBox>;

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Standard operations produce wrong swagger"
// The standard operation names the body as resource, so the generated swagger has parameter
// {
Expand Down Expand Up @@ -235,6 +236,7 @@ interface DevBoxes {
// "name": "body",
// "in": "body",
// }
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@doc("Applies customizations to the Dev Box.")
@put
@route("/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}")
Expand Down
1 change: 1 addition & 0 deletions specification/devcenter/DevCenter/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ interface DevBoxesClientOperations {
listAllDevBoxesByUser is DevCenterService.DevBoxes.listAllDevBoxesByUser;
listDevBoxes is DevCenterService.DevBoxes.listDevBoxesByUser;
getDevBox is DevCenterService.DevBoxes.getDevBoxByUser;
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@convenientAPI(false, "csharp") // https://github.com/Azure/azure-rest-api-specs/issues/28083
createDevBox is DevCenterService.DevBoxes.createDevBox;
deleteDevBox is DevCenterService.DevBoxes.deleteDevBox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import "./Microsoft.ResourceNotifications/ResourceNotifications.tsp";
import "./propertyNameOverride.tsp";

/** Azure Messaging EventGrid SystemEvents */
#suppress "@azure-tools/typespec-azure-core/auth-required" "!!FIXME!!"
@service({
title: "Azure.Messaging.SystemEvents",
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ alias DeidentifyOperations = ResourceOperations<

// Text-Deidentification Operations

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("Create a de-identification job.")
@pollingOperation(getJob)
op createJob is DeidentifyOperations.LongRunningResourceCreateOrReplace<DeidentificationJob>;
Expand Down
4 changes: 4 additions & 0 deletions specification/loadtestservice/LoadTestService/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace Customizations;
@@clientName(MetricDimensionsRequest.timespan, "time_interval", "python");

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "LoadTestAdministrationClient",
service: Microsoft.LoadTestService,
Expand All @@ -36,6 +37,7 @@ interface AdministrationOperations {
}

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "LoadTestRunClient",
service: Microsoft.LoadTestService,
Expand Down Expand Up @@ -65,6 +67,7 @@ interface TestRunOperations {

// NOTE: `LoadTestAdministrationClient` will contain all administration operations and `LoadTestRunClient` will contain all run based operations
// A separate interface is made to just segregate the operations by resource type
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "LoadTestAdministrationClient",
service: Microsoft.LoadTestService,
Expand All @@ -76,6 +79,7 @@ interface TestProfileAdministrationOperations {
listTestProfiles is TestProfileAdministration.listTestProfiles;
}

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "LoadTestRunClient",
service: Microsoft.LoadTestService,
Expand Down
4 changes: 4 additions & 0 deletions specification/loadtestservice/LoadTestService/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ interface LoadTestAdministration {

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Our operation is not following the standard put behavior https://github.com/Azure/typespec-azure/issues/3743"
#suppress "@azure-tools/typespec-azure-core/byos" "It is limiting for users to have storage first before creating a load test also it will be breaking change for us."
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("""
Upload input file for a given test Id. File size can't be more than 50 MB.
Existing file with same name for the given test will be overwritten. File
Expand Down Expand Up @@ -241,6 +242,7 @@ interface LoadTestRun {
stop is StandardResourceOperations.ResourceAction<TestRun, {}, TestRun, {}>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("List the metric namespaces for a load test run.")
@doc("List the metric namespaces for a load test run.")
@route("/test-runs/{testRunId}/metric-namespaces")
Expand All @@ -261,6 +263,7 @@ interface LoadTestRun {
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("List the metric definitions for a load test run.")
@doc("List the metric definitions for a load test run.")
@route("/test-runs/{testRunId}/metric-definitions")
Expand Down Expand Up @@ -315,6 +318,7 @@ interface LoadTestRun {
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@summary("List the dimension values for the given metric dimension name.")
@doc("List the dimension values for the given metric dimension name.")
@route("/test-runs/{testRunId}/metric-dimensions/{name}/values")
Expand Down
Loading

0 comments on commit fa2f8bd

Please sign in to comment.