diff --git a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidgetSample.json b/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidgetSample.json deleted file mode 100644 index f3f2a8b0056c..000000000000 --- a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidgetSample.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "Widgets_CreateOrUpdateWidget", - "operationId": "Widgets_CreateOrUpdateWidget", - "parameters": { - "widgetName": "name1", - "api-version": "2022-11-01-preview", - "resource": { - "manufacturerId": "manufacturer id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - }, - "responses": { - "200": { - "body": { - "name": "name1", - "manufacturerId": "manufacturer id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - }, - "201": { - "body": { - "name": "name1", - "manufacturerId": "manufacturer id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - } - } -} diff --git a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_DeleteWidgetSample.json b/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_DeleteWidgetSample.json deleted file mode 100644 index 8a6b117b5cde..000000000000 --- a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_DeleteWidgetSample.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "operationId": "Widgets_DeleteWidget", - "title": "Delete widget by widget name using long-running operation.", - "parameters": { - "api-version": "2022-11-01-preview", - "widgetName": "searchbox" - }, - "responses": { - "202": { - "headers": { - "location": "https://contosowidgetmanager.azure.com/operations/00000000-0000-0000-0000-000000000123/result?api-version=2022-11-01-preview", - "operation-location": "https://contosowidgetmanager.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2022-11-01-preview" - }, - "body": { - "id": "id1", - "status": "deleted" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message", - "details": [] - } - } - } - } -} diff --git a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatusSample.json b/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatusSample.json deleted file mode 100644 index 3d3b76b030dc..000000000000 --- a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatusSample.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "title": "Widgets_GetWidgetOperationStatus", - "operationId": "Widgets_GetWidgetOperationStatus", - "parameters": { - "widgetName": "name1", - "operationId": "opreation id1", - "api-version": "2022-11-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "opreation id1", - "status": "InProgress", - "error": { - "code": "Error code", - "message": "Error message", - "target": "op1", - "details": [ - { - "code": "code1", - "message": "message1", - "target": "op1", - "details": [], - "innererror": { - "code": "code1" - } - } - ], - "innererror": { - "code": "code1" - } - }, - "result": { - "name": "bingsearch", - "manufacturerId": "manufacturer Id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - }, - "widgetName": "rfazvwnfwwomiwrh" - } - } - } -} diff --git a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_GetWidgetSample.json b/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_GetWidgetSample.json deleted file mode 100644 index 9c07ed974352..000000000000 --- a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_GetWidgetSample.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "operationId": "Widgets_GetWidget", - "title": "Get widget by widget name.", - "parameters": { - "api-version": "2022-11-01-preview", - "widgetName": "searchbox" - }, - "responses": { - "200": { - "body": { - "name": "bingsearch", - "manufacturerId": "a-22-01" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message", - "details": [] - } - } - } - } -} diff --git a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_ListWidgetsSample.json b/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_ListWidgetsSample.json deleted file mode 100644 index 5b7d6e82d933..000000000000 --- a/specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview/Widgets_ListWidgetsSample.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "title": "Widgets_ListWidgets", - "operationId": "Widgets_ListWidgets", - "parameters": { - "top": 8, - "skip": 15, - "maxpagesize": 27, - "api-version": "2022-11-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "bingsearch", - "manufacturerId": "manufacturer Id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - ], - "nextLink": "https://microsoft.com/a" - } - } - } -} diff --git a/specification/contosowidgetmanager/Contoso.WidgetManager/main.tsp b/specification/contosowidgetmanager/Contoso.WidgetManager/main.tsp deleted file mode 100644 index 7e5e683af7f9..000000000000 --- a/specification/contosowidgetmanager/Contoso.WidgetManager/main.tsp +++ /dev/null @@ -1,63 +0,0 @@ -import "@typespec/http"; -import "@typespec/rest"; -import "@typespec/versioning"; -import "@azure-tools/typespec-azure-core"; -import "../Contoso.WidgetManager.Shared"; - -using TypeSpec.Http; -using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.Core; - -@useAuth(AadOauth2Auth<["https://contoso.azure.com/.default"]>) -@service({ - title: "Contoso Widget Manager", -}) -@versioned(Contoso.WidgetManager.Versions) -namespace Azure.Contoso.WidgetManager; - -@doc("Versions info.") -enum Versions { - @doc("The 2022-11-01-preview version.") - @useDependency(Azure.Core.Versions.v1_0_Preview_1) - v2022_11_01_Preview: "2022-11-01-preview", -} - -@doc("A widget.") -@resource("widgets") -model WidgetSuite { - @key("widgetName") - @doc("The widget name.") - @visibility("read") - name: string; - - @doc("The ID of the widget's manufacturer.") - manufacturerId: string; - - @doc("The faked shared model.") - sharedModel?: FakedSharedModel; -} - -interface Widgets { - @doc("Fetch a Widget by name.") - getWidget is ResourceRead; - - @doc("Gets status of a Widget operation.") - getWidgetOperationStatus is GetResourceOperationStatus; - - @doc("Creates or updates a Widget asynchronously.") - @pollingOperation(Widgets.getWidgetOperationStatus) - createOrUpdateWidget is StandardResourceOperations.LongRunningResourceCreateOrUpdate; - - @doc("Delete a Widget asynchronously.") - @pollingOperation(Widgets.getWidgetOperationStatus) - deleteWidget is LongRunningResourceDelete; - - @doc("List Widget resources") - listWidgets is ResourceList< - WidgetSuite, - { - parameters: StandardListQueryParameters; - } - >; -} diff --git a/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml b/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml deleted file mode 100644 index 692ce29313bc..000000000000 --- a/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml +++ /dev/null @@ -1,41 +0,0 @@ -parameters: - "service-dir": - default: "sdk/contosowidgetmanager" - "dependencies": - "additionalDirectories": - - "specification/contosowidgetmanager/Contoso.WidgetManager.Shared/" - default: "" -emit: - - "@azure-tools/typespec-autorest" -linter: - extends: - - "@azure-tools/typespec-azure-rulesets/data-plane" -options: - "@azure-tools/typespec-autorest": - azure-resource-provider-folder: "data-plane" - emit-lro-options: "none" - emitter-output-dir: "{project-root}/.." - examples-directory: "examples" - output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/widgets.json" - "@azure-tools/typespec-python": - package-dir: "azure-contoso-widgetmanager" - package-name: "{package-dir}" - generate-test: true - generate-sample: true - examples-directory: "{project-root}/examples" - flavor: azure - "@azure-tools/typespec-csharp": - package-dir: "Azure.Template.Contoso" - clear-output-folder: true - model-namespace: false - namespace: "{package-dir}" - flavor: azure - "@azure-tools/typespec-ts": - package-dir: "contosowidgetmanager-rest" - packageDetails: - name: "@azure-rest/contoso-widgetmanager-rest" - flavor: azure - "@azure-tools/typespec-java": - package-dir: "azure-contoso-widgetmanager" - namespace: com.azure.contoso.widgetmanager - flavor: azure diff --git a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidgetSample.json b/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidgetSample.json deleted file mode 100644 index f3f2a8b0056c..000000000000 --- a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidgetSample.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "Widgets_CreateOrUpdateWidget", - "operationId": "Widgets_CreateOrUpdateWidget", - "parameters": { - "widgetName": "name1", - "api-version": "2022-11-01-preview", - "resource": { - "manufacturerId": "manufacturer id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - }, - "responses": { - "200": { - "body": { - "name": "name1", - "manufacturerId": "manufacturer id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - }, - "201": { - "body": { - "name": "name1", - "manufacturerId": "manufacturer id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - } - } -} diff --git a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json b/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json deleted file mode 100644 index 8a6b117b5cde..000000000000 --- a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_DeleteWidgetSample.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "operationId": "Widgets_DeleteWidget", - "title": "Delete widget by widget name using long-running operation.", - "parameters": { - "api-version": "2022-11-01-preview", - "widgetName": "searchbox" - }, - "responses": { - "202": { - "headers": { - "location": "https://contosowidgetmanager.azure.com/operations/00000000-0000-0000-0000-000000000123/result?api-version=2022-11-01-preview", - "operation-location": "https://contosowidgetmanager.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2022-11-01-preview" - }, - "body": { - "id": "id1", - "status": "deleted" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message", - "details": [] - } - } - } - } -} diff --git a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatusSample.json b/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatusSample.json deleted file mode 100644 index 3d3b76b030dc..000000000000 --- a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatusSample.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "title": "Widgets_GetWidgetOperationStatus", - "operationId": "Widgets_GetWidgetOperationStatus", - "parameters": { - "widgetName": "name1", - "operationId": "opreation id1", - "api-version": "2022-11-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "opreation id1", - "status": "InProgress", - "error": { - "code": "Error code", - "message": "Error message", - "target": "op1", - "details": [ - { - "code": "code1", - "message": "message1", - "target": "op1", - "details": [], - "innererror": { - "code": "code1" - } - } - ], - "innererror": { - "code": "code1" - } - }, - "result": { - "name": "bingsearch", - "manufacturerId": "manufacturer Id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - }, - "widgetName": "rfazvwnfwwomiwrh" - } - } - } -} diff --git a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_GetWidgetSample.json b/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_GetWidgetSample.json deleted file mode 100644 index 9c07ed974352..000000000000 --- a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_GetWidgetSample.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "operationId": "Widgets_GetWidget", - "title": "Get widget by widget name.", - "parameters": { - "api-version": "2022-11-01-preview", - "widgetName": "searchbox" - }, - "responses": { - "200": { - "body": { - "name": "bingsearch", - "manufacturerId": "a-22-01" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message", - "details": [] - } - } - } - } -} diff --git a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_ListWidgetsSample.json b/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_ListWidgetsSample.json deleted file mode 100644 index 5b7d6e82d933..000000000000 --- a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_ListWidgetsSample.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "title": "Widgets_ListWidgets", - "operationId": "Widgets_ListWidgets", - "parameters": { - "top": 8, - "skip": 15, - "maxpagesize": 27, - "api-version": "2022-11-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "bingsearch", - "manufacturerId": "manufacturer Id1", - "sharedModel": { - "tag": "tag1", - "createdAt": "2023-01-09T02:12:25.689Z" - } - } - ], - "nextLink": "https://microsoft.com/a" - } - } - } -} diff --git a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json b/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json deleted file mode 100644 index 22be02d8821e..000000000000 --- a/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json +++ /dev/null @@ -1,550 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Contoso Widget Manager", - "version": "2022-11-01-preview", - "x-typespec-generated": [ - { - "emitter": "@azure-tools/typespec-autorest" - } - ] - }, - "schemes": [ - "https" - ], - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "security": [ - { - "AadOauth2Auth": [ - "https://contoso.azure.com/.default" - ] - } - ], - "securityDefinitions": { - "AadOauth2Auth": { - "type": "oauth2", - "description": "The Azure Active Directory OAuth2 Flow", - "flow": "accessCode", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "scopes": { - "https://contoso.azure.com/.default": "" - }, - "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" - } - }, - "tags": [], - "paths": { - "/widgets": { - "get": { - "operationId": "Widgets_ListWidgets", - "description": "List Widget resources", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/PagedWidgetSuite" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Widgets_ListWidgets": { - "$ref": "./examples/Widgets_ListWidgetsSample.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/widgets/{widgetName}": { - "get": { - "operationId": "Widgets_GetWidget", - "description": "Fetch a Widget by name.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "widgetName", - "in": "path", - "description": "The widget name.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/WidgetSuite" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Get widget by widget name.": { - "$ref": "./examples/Widgets_GetWidgetSample.json" - } - } - }, - "patch": { - "operationId": "Widgets_CreateOrUpdateWidget", - "description": "Creates or updates a Widget asynchronously.", - "consumes": [ - "application/merge-patch+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "widgetName", - "in": "path", - "description": "The widget name.", - "required": true, - "type": "string" - }, - { - "name": "resource", - "in": "body", - "description": "The resource instance.", - "required": true, - "schema": { - "$ref": "#/definitions/WidgetSuiteCreateOrUpdate" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/WidgetSuite" - }, - "headers": { - "Operation-Location": { - "type": "string", - "format": "uri", - "description": "The location for monitoring the operation state." - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "schema": { - "$ref": "#/definitions/WidgetSuite" - }, - "headers": { - "Operation-Location": { - "type": "string", - "format": "uri", - "description": "The location for monitoring the operation state." - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Widgets_CreateOrUpdateWidget": { - "$ref": "./examples/Widgets_CreateOrUpdateWidgetSample.json" - } - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "Widgets_DeleteWidget", - "description": "Delete a Widget asynchronously.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "widgetName", - "in": "path", - "description": "The widget name.", - "required": true, - "type": "string" - } - ], - "responses": { - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "schema": { - "type": "object", - "description": "Provides status details for long running operations.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the operation." - }, - "status": { - "$ref": "#/definitions/Azure.Core.Foundations.OperationState", - "description": "The status of the operation" - }, - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "Error object that describes the error when status is \"Failed\"." - } - }, - "required": [ - "id", - "status" - ] - }, - "headers": { - "Operation-Location": { - "type": "string", - "format": "uri", - "description": "The location for monitoring the operation state." - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Delete widget by widget name using long-running operation.": { - "$ref": "./examples/Widgets_DeleteWidgetSample.json" - } - }, - "x-ms-long-running-operation": true - } - }, - "/widgets/{widgetName}/operations/{operationId}": { - "get": { - "operationId": "Widgets_GetWidgetOperationStatus", - "description": "Gets status of a Widget operation.", - "parameters": [ - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "widgetName", - "in": "path", - "description": "The widget name.", - "required": true, - "type": "string" - }, - { - "name": "operationId", - "in": "path", - "description": "The unique ID of the operation.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "type": "object", - "description": "Provides status details for long running operations.", - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the operation." - }, - "status": { - "$ref": "#/definitions/Azure.Core.Foundations.OperationState", - "description": "The status of the operation" - }, - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "Error object that describes the error when status is \"Failed\"." - }, - "result": { - "$ref": "#/definitions/WidgetSuite", - "description": "The result of the operation." - } - }, - "required": [ - "id", - "status" - ] - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" - }, - "headers": { - "x-ms-error-code": { - "type": "string", - "description": "String error code indicating what went wrong." - } - } - } - }, - "x-ms-examples": { - "Widgets_GetWidgetOperationStatus": { - "$ref": "./examples/Widgets_GetWidgetOperationStatusSample.json" - } - } - } - } - }, - "definitions": { - "Azure.Core.Foundations.Error": { - "type": "object", - "description": "The error object.", - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "message": { - "type": "string", - "description": "A human-readable representation of the error." - }, - "target": { - "type": "string", - "description": "The target of the error." - }, - "details": { - "type": "array", - "description": "An array of details about specific errors that led to this reported error.", - "items": { - "$ref": "#/definitions/Azure.Core.Foundations.Error" - }, - "x-ms-identifiers": [] - }, - "innererror": { - "$ref": "#/definitions/Azure.Core.Foundations.InnerError", - "description": "An object containing more specific information than the current object about the error." - } - }, - "required": [ - "code", - "message" - ] - }, - "Azure.Core.Foundations.ErrorResponse": { - "type": "object", - "description": "A response containing error details.", - "properties": { - "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", - "description": "The error object." - } - }, - "required": [ - "error" - ] - }, - "Azure.Core.Foundations.InnerError": { - "type": "object", - "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "innererror": { - "$ref": "#/definitions/Azure.Core.Foundations.InnerError", - "description": "Inner error." - } - } - }, - "Azure.Core.Foundations.OperationState": { - "type": "string", - "description": "Enum describing allowed operation states.", - "enum": [ - "NotStarted", - "Running", - "Succeeded", - "Failed", - "Canceled" - ], - "x-ms-enum": { - "name": "OperationState", - "modelAsString": true, - "values": [ - { - "name": "NotStarted", - "value": "NotStarted", - "description": "The operation has not started." - }, - { - "name": "Running", - "value": "Running", - "description": "The operation is in progress." - }, - { - "name": "Succeeded", - "value": "Succeeded", - "description": "The operation has completed successfully." - }, - { - "name": "Failed", - "value": "Failed", - "description": "The operation has failed." - }, - { - "name": "Canceled", - "value": "Canceled", - "description": "The operation has been canceled by the user." - } - ] - } - }, - "FakedSharedModel": { - "type": "object", - "description": "Faked shared model", - "properties": { - "tag": { - "type": "string", - "description": "The tag." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The created date." - } - }, - "required": [ - "tag", - "createdAt" - ] - }, - "FakedSharedModelCreateOrUpdate": { - "type": "object", - "description": "Faked shared model", - "properties": { - "tag": { - "type": "string", - "description": "The tag." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The created date." - } - } - }, - "PagedWidgetSuite": { - "type": "object", - "description": "Paged collection of WidgetSuite items", - "properties": { - "value": { - "type": "array", - "description": "The WidgetSuite items on this page", - "items": { - "$ref": "#/definitions/WidgetSuite" - }, - "x-ms-identifiers": [] - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, - "WidgetSuite": { - "type": "object", - "description": "A widget.", - "properties": { - "name": { - "type": "string", - "description": "The widget name.", - "readOnly": true - }, - "manufacturerId": { - "type": "string", - "description": "The ID of the widget's manufacturer." - }, - "sharedModel": { - "$ref": "#/definitions/FakedSharedModel", - "description": "The faked shared model." - } - }, - "required": [ - "name", - "manufacturerId" - ] - }, - "WidgetSuiteCreateOrUpdate": { - "type": "object", - "description": "A widget.", - "properties": { - "manufacturerId": { - "type": "string", - "description": "The ID of the widget's manufacturer." - }, - "sharedModel": { - "$ref": "#/definitions/FakedSharedModelCreateOrUpdate", - "description": "The faked shared model." - } - } - } - }, - "parameters": { - "Azure.Core.Foundations.ApiVersionParameter": { - "name": "api-version", - "in": "query", - "description": "The API version to use for this operation.", - "required": true, - "type": "string", - "minLength": 1, - "x-ms-parameter-location": "method", - "x-ms-client-name": "apiVersion" - } - } -} diff --git a/specification/contosowidgetmanager/data-plane/readme.md b/specification/contosowidgetmanager/data-plane/readme.md deleted file mode 100644 index 60258e3463c2..000000000000 --- a/specification/contosowidgetmanager/data-plane/readme.md +++ /dev/null @@ -1,54 +0,0 @@ -# Contoso.WidgetManager - -> see https://aka.ms/autorest - -This is the AutoRest configuration file for Contoso.WidgetManager. - -## Configuration - -### Basic Information - -This is a TypeSpec project so we only want to readme to default the default tag and point to the outputted swagger file. -This is used for some tools such as doc generation and swagger apiview generation it isn't used for SDK code gen as we -use the native TypeSpec code generation configured in the tspconfig.yaml file. - -```yaml -openapi-type: data-plane -tag: package-2022-11-01-preview -``` - -### Tag: package-2022-11-01-preview - -These settings apply only when `--tag=package-2022-11-01-preview` is specified on the command line. - -```yaml $(tag) == 'package-2022-11-01-preview' -input-file: - - Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json -``` - -### Suppress non-TypeSpec SDK related linting rules - -These set of linting rules aren't applicable to the new TypeSpec SDK code generators so suppressing them here. Eventually we will -opt-out these rules from running in the linting tools for TypeSpec generated swagger files. - -``` yaml -suppressions: - - code: AvoidAnonymousTypes - - code: PatchInOperationName - - code: OperationIdNounVerb - - code: RequiredReadOnlyProperties - - code: SchemaNamesConvention - - code: SchemaDescriptionOrTitle -``` - -### Suppress rules that might be fixed - -These set of linting rules we expect to fixed in typespec-autorest emitter but for now suppressing. -Github issue filed at https://github.com/Azure/typespec-azure/issues/2762 - -``` yaml -suppressions: - - code: LroExtension - - code: SchemaTypeAndFormat - - code: PathParameterSchema -```