diff --git a/specification/widget/cspell.yaml b/specification/widget/cspell.yaml new file mode 100644 index 000000000000..a8188a0f5986 --- /dev/null +++ b/specification/widget/cspell.yaml @@ -0,0 +1,15 @@ +# This file configures spell checking. Items in "words" were initially populated +# with words that might be spelling errors. Review these words and take +# appropriate action. For more information, see: https://aka.ms/ci-fix#spell-check + +# Spell checking is not case sensitive +# Keep word lists in alphabetical order so the file is easier to manage +version: "0.2" +import: + - ../../cspell.yaml +words: + - armwidget + - widgetanalytics + - widget + - azmanager + - byval diff --git a/specification/widget/data-plane/WidgetAnalytics/client.tsp b/specification/widget/data-plane/WidgetAnalytics/client.tsp new file mode 100644 index 000000000000..aefdd7aab74a --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/client.tsp @@ -0,0 +1,7 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using WidgetAnalytics; +using Azure.ClientGenerator.Core; + +@@clientName(Widgets, "AzureWidgets", "csharp"); diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..3214aa6fdcb5 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json @@ -0,0 +1,40 @@ +{ + "title": "Widgets_CreateOrUpdateWidget - generated by [MaximumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "nnyaugmtihetcdtqzoi", + "resource": { + "manufacturerId": "manufacturer id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..cdbf31049f8e --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Widgets_CreateOrUpdateWidget - generated by [MinimumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "vanfrtqzyxehzoiijt", + "resource": {} + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_DeleteWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_DeleteWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..d6f143ae4a7f --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_DeleteWidget_MaximumSet_Gen.json @@ -0,0 +1,29 @@ +{ + "title": "Delete widget by widget name using long-running operation. - generated by [MaximumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "fh" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "ykquyjwogwjsgllmyy", + "status": "deleted", + "error": { + "code": "Error code", + "message": "Error message", + "details": [], + "target": "hwpnjraiavviprjwkxytzgouedzae", + "innererror": { + "code": "ephpxitlbkapnhizlkpm" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_DeleteWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_DeleteWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..c658d16bf30e --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_DeleteWidget_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Delete widget by widget name using long-running operation. - generated by [MinimumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "bhe" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "kjljhll", + "status": "deleted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json new file mode 100644 index 000000000000..5c8faf08e89d --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json @@ -0,0 +1,34 @@ +{ + "title": "Widgets_GetWidgetOperationStatus - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "kewwmx", + "operationId": "xhvakdaltmsecarmjquxnqmx" + }, + "responses": { + "200": { + "body": { + "id": "lnqorcybnmxthzvwqszvjallgnsezy", + "status": "deleted", + "error": { + "code": "Error code", + "message": "Error message", + "details": [], + "target": "hwpnjraiavviprjwkxytzgouedzae", + "innererror": { + "code": "ephpxitlbkapnhizlkpm" + } + }, + "result": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json new file mode 100644 index 000000000000..a6162db05fec --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json @@ -0,0 +1,17 @@ +{ + "title": "Widgets_GetWidgetOperationStatus - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "lbkntckvidstkashmkcriow", + "operationId": "vtujiacwsynmhmdqsxeedcin" + }, + "responses": { + "200": { + "body": { + "id": "wujlnxjvcrnfplzjiarfl", + "status": "deleted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..76d0f9bde31a --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidget_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Get widget by widget name. - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "ewezriqyebqomhruivjzaszrhp" + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..6724381390fc --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_GetWidget_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "Get widget by widget name. - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "txdcmdduebevkygntbjaftd" + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_ListWidgets_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_ListWidgets_MaximumSet_Gen.json new file mode 100644 index 000000000000..76478df6dfb5 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_ListWidgets_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Widgets_ListWidgets - generated by [MaximumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "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/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_ListWidgets_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_ListWidgets_MinimumSet_Gen.json new file mode 100644 index 000000000000..77fb9961092d --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-11-01-preview/Widgets_ListWidgets_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Widgets_ListWidgets - generated by [MinimumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + ] + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..09b26ae7c2bb --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json @@ -0,0 +1,40 @@ +{ + "title": "Widgets_CreateOrUpdateWidget_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "isnivlbpqxavqujpljswwlst", + "resource": { + "manufacturerId": "jrqsdxnkvkcnjvwcxzpkpbq", + "sharedModel": { + "tag": "vm", + "createdAt": "2025-06-06T23:37:30.059Z" + } + } + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..450062897a34 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Widgets_CreateOrUpdateWidget_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "leuoadyxudoeoqdg", + "resource": {} + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_DeleteWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_DeleteWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..980934c15c2b --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_DeleteWidget_MaximumSet_Gen.json @@ -0,0 +1,29 @@ +{ + "title": "Widgets_DeleteWidget_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "prpqlijvgcjkpappa" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "afzlfaygsdpcaffsrjyaf", + "status": "NotStarted", + "error": { + "code": "uvranhgbrnpfnyygfptn", + "message": "kxueeqursik", + "target": "bqfzvmeytfshjmqmynzks", + "details": [], + "innererror": { + "code": "jhtxtyehhmgpyfyiknqqgnn" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_DeleteWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_DeleteWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..a501262872e4 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_DeleteWidget_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Widgets_DeleteWidget_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "tlpaxhonk" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "gtvrulqi", + "status": "NotStarted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json new file mode 100644 index 000000000000..24d4e361ee4e --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json @@ -0,0 +1,34 @@ +{ + "title": "Widgets_GetWidgetOperationStatus_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "bjjcg", + "operationId": "xoeciptfngmxcrsbhojolvv" + }, + "responses": { + "200": { + "body": { + "id": "bugspxldrvrvmxho", + "status": "NotStarted", + "error": { + "code": "uvranhgbrnpfnyygfptn", + "message": "kxueeqursik", + "target": "bqfzvmeytfshjmqmynzks", + "details": [], + "innererror": { + "code": "jhtxtyehhmgpyfyiknqqgnn" + } + }, + "result": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json new file mode 100644 index 000000000000..632ce77b2de0 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json @@ -0,0 +1,17 @@ +{ + "title": "Widgets_GetWidgetOperationStatus_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "wavxhvsaustltv", + "operationId": "sos" + }, + "responses": { + "200": { + "body": { + "id": "fcxeiholufwlohgylanysbgiiozr", + "status": "NotStarted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..af9756e86d84 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidget_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Widgets_GetWidget_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "itugxoahspbpltvmbca" + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..b380f5cd9b23 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_GetWidget_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "Widgets_GetWidget_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "paolprrkkniv" + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_ListWidgets_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_ListWidgets_MaximumSet_Gen.json new file mode 100644 index 000000000000..da53ca7c94d6 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_ListWidgets_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Widgets_ListWidgets_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "api-version": "2022-12-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_ListWidgets_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_ListWidgets_MinimumSet_Gen.json new file mode 100644 index 000000000000..5c30fe3d60de --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/examples/2022-12-01/Widgets_ListWidgets_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Widgets_ListWidgets_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "api-version": "2022-12-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + ] + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/main.tsp b/specification/widget/data-plane/WidgetAnalytics/main.tsp new file mode 100644 index 000000000000..d397f3f75514 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/main.tsp @@ -0,0 +1,65 @@ +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "./shared.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; + +@useAuth(AadOauth2Auth<["https://azure.com/.default"]>) +@service(#{ title: "WidgetAnalytics" }) +@versioned(WidgetAnalytics.Versions) +namespace WidgetAnalytics; + +@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("The 2022-12-01 version.") + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2022_12_01: "2022-12-01", +} + +@doc("A widget.") +@resource("widgets") +model WidgetSuite { + @key("widgetName") + @doc("The widget name.") + @visibility(Lifecycle.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/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..3214aa6fdcb5 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json @@ -0,0 +1,40 @@ +{ + "title": "Widgets_CreateOrUpdateWidget - generated by [MaximumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "nnyaugmtihetcdtqzoi", + "resource": { + "manufacturerId": "manufacturer id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..cdbf31049f8e --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Widgets_CreateOrUpdateWidget - generated by [MinimumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "vanfrtqzyxehzoiijt", + "resource": {} + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_DeleteWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_DeleteWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..d6f143ae4a7f --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_DeleteWidget_MaximumSet_Gen.json @@ -0,0 +1,29 @@ +{ + "title": "Delete widget by widget name using long-running operation. - generated by [MaximumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "fh" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "ykquyjwogwjsgllmyy", + "status": "deleted", + "error": { + "code": "Error code", + "message": "Error message", + "details": [], + "target": "hwpnjraiavviprjwkxytzgouedzae", + "innererror": { + "code": "ephpxitlbkapnhizlkpm" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_DeleteWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_DeleteWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..c658d16bf30e --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_DeleteWidget_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Delete widget by widget name using long-running operation. - generated by [MinimumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "bhe" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "kjljhll", + "status": "deleted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json new file mode 100644 index 000000000000..5c8faf08e89d --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json @@ -0,0 +1,34 @@ +{ + "title": "Widgets_GetWidgetOperationStatus - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "kewwmx", + "operationId": "xhvakdaltmsecarmjquxnqmx" + }, + "responses": { + "200": { + "body": { + "id": "lnqorcybnmxthzvwqszvjallgnsezy", + "status": "deleted", + "error": { + "code": "Error code", + "message": "Error message", + "details": [], + "target": "hwpnjraiavviprjwkxytzgouedzae", + "innererror": { + "code": "ephpxitlbkapnhizlkpm" + } + }, + "result": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json new file mode 100644 index 000000000000..a6162db05fec --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json @@ -0,0 +1,17 @@ +{ + "title": "Widgets_GetWidgetOperationStatus - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "lbkntckvidstkashmkcriow", + "operationId": "vtujiacwsynmhmdqsxeedcin" + }, + "responses": { + "200": { + "body": { + "id": "wujlnxjvcrnfplzjiarfl", + "status": "deleted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..76d0f9bde31a --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidget_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Get widget by widget name. - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "ewezriqyebqomhruivjzaszrhp" + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1", + "sharedModel": { + "tag": "tag1", + "createdAt": "2023-01-09T02:12:25.689Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..6724381390fc --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_GetWidget_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "Get widget by widget name. - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-11-01-preview", + "widgetName": "txdcmdduebevkygntbjaftd" + }, + "responses": { + "200": { + "body": { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_ListWidgets_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_ListWidgets_MaximumSet_Gen.json new file mode 100644 index 000000000000..76478df6dfb5 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_ListWidgets_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Widgets_ListWidgets - generated by [MaximumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "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/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_ListWidgets_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_ListWidgets_MinimumSet_Gen.json new file mode 100644 index 000000000000..77fb9961092d --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/examples/Widgets_ListWidgets_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Widgets_ListWidgets - generated by [MinimumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "bingsearch", + "manufacturerId": "manufacturer Id1" + } + ] + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/widgetanalytics.json b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/widgetanalytics.json new file mode 100644 index 000000000000..7f489edbce86 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/preview/2022-11-01-preview/widgetanalytics.json @@ -0,0 +1,565 @@ +{ + "swagger": "2.0", + "info": { + "title": "WidgetAnalytics", + "version": "2022-11-01-preview", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "https://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://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 - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_ListWidgets_MaximumSet_Gen.json" + }, + "Widgets_ListWidgets - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_ListWidgets_MinimumSet_Gen.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. - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_GetWidget_MaximumSet_Gen.json" + }, + "Get widget by widget name. - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_GetWidget_MinimumSet_Gen.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 - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json" + }, + "Widgets_CreateOrUpdateWidget - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.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. - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_DeleteWidget_MaximumSet_Gen.json" + }, + "Delete widget by widget name using long-running operation. - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_DeleteWidget_MinimumSet_Gen.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 - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json" + }, + "Widgets_GetWidgetOperationStatus - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.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/azure/Guidelines.md#handling-errors.", + "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/widget/data-plane/WidgetAnalytics/readme.md b/specification/widget/data-plane/WidgetAnalytics/readme.md new file mode 100644 index 000000000000..3d2054b8b7ea --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/readme.md @@ -0,0 +1,78 @@ +# WidgetAnalytics + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for WidgetAnalytics. + +## 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-12-01 +``` + +### Tag: package-2022-12-01 + +These settings apply only when `--tag=package-2022-12-01` is specified on the command line. + +```yaml $(tag) == 'package-2022-12-01' +input-file: + - stable/2022-12-01/widgetanalytics.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 +``` + +### 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: + - preview/2022-11-01-preview/widgetanalytics.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 +``` diff --git a/specification/widget/data-plane/WidgetAnalytics/shared.tsp b/specification/widget/data-plane/WidgetAnalytics/shared.tsp new file mode 100644 index 000000000000..1b94bb705031 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/shared.tsp @@ -0,0 +1,8 @@ +@doc("Faked shared model") +model FakedSharedModel { + @doc("The tag.") + tag: string; + + @doc("The created date.") + createdAt: utcDateTime; +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..09b26ae7c2bb --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json @@ -0,0 +1,40 @@ +{ + "title": "Widgets_CreateOrUpdateWidget_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "isnivlbpqxavqujpljswwlst", + "resource": { + "manufacturerId": "jrqsdxnkvkcnjvwcxzpkpbq", + "sharedModel": { + "tag": "vm", + "createdAt": "2025-06-06T23:37:30.059Z" + } + } + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..450062897a34 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Widgets_CreateOrUpdateWidget_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_CreateOrUpdateWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "leuoadyxudoeoqdg", + "resource": {} + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + }, + "201": { + "headers": { + "location": "https://contoso.com/operationstatus" + }, + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_DeleteWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_DeleteWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..980934c15c2b --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_DeleteWidget_MaximumSet_Gen.json @@ -0,0 +1,29 @@ +{ + "title": "Widgets_DeleteWidget_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "prpqlijvgcjkpappa" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "afzlfaygsdpcaffsrjyaf", + "status": "NotStarted", + "error": { + "code": "uvranhgbrnpfnyygfptn", + "message": "kxueeqursik", + "target": "bqfzvmeytfshjmqmynzks", + "details": [], + "innererror": { + "code": "jhtxtyehhmgpyfyiknqqgnn" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_DeleteWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_DeleteWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..a501262872e4 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_DeleteWidget_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Widgets_DeleteWidget_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_DeleteWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "tlpaxhonk" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus", + "operation-location": "https://contoso.com/operationstatus" + }, + "body": { + "id": "gtvrulqi", + "status": "NotStarted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json new file mode 100644 index 000000000000..24d4e361ee4e --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json @@ -0,0 +1,34 @@ +{ + "title": "Widgets_GetWidgetOperationStatus_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "bjjcg", + "operationId": "xoeciptfngmxcrsbhojolvv" + }, + "responses": { + "200": { + "body": { + "id": "bugspxldrvrvmxho", + "status": "NotStarted", + "error": { + "code": "uvranhgbrnpfnyygfptn", + "message": "kxueeqursik", + "target": "bqfzvmeytfshjmqmynzks", + "details": [], + "innererror": { + "code": "jhtxtyehhmgpyfyiknqqgnn" + } + }, + "result": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json new file mode 100644 index 000000000000..632ce77b2de0 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.json @@ -0,0 +1,17 @@ +{ + "title": "Widgets_GetWidgetOperationStatus_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidgetOperationStatus", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "wavxhvsaustltv", + "operationId": "sos" + }, + "responses": { + "200": { + "body": { + "id": "fcxeiholufwlohgylanysbgiiozr", + "status": "NotStarted" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidget_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidget_MaximumSet_Gen.json new file mode 100644 index 000000000000..af9756e86d84 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidget_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Widgets_GetWidget_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "itugxoahspbpltvmbca" + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidget_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidget_MinimumSet_Gen.json new file mode 100644 index 000000000000..b380f5cd9b23 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_GetWidget_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "Widgets_GetWidget_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_GetWidget", + "parameters": { + "api-version": "2022-12-01", + "widgetName": "paolprrkkniv" + }, + "responses": { + "200": { + "body": { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_ListWidgets_MaximumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_ListWidgets_MaximumSet_Gen.json new file mode 100644 index 000000000000..da53ca7c94d6 --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_ListWidgets_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Widgets_ListWidgets_MaximumSet_Gen - generated by [MaximumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "api-version": "2022-12-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih", + "sharedModel": { + "tag": "cyofpthmm", + "createdAt": "2025-06-06T23:37:29.868Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_ListWidgets_MinimumSet_Gen.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_ListWidgets_MinimumSet_Gen.json new file mode 100644 index 000000000000..5c30fe3d60de --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/examples/Widgets_ListWidgets_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Widgets_ListWidgets_MaximumSet_Gen - generated by [MinimumSet] rule", + "operationId": "Widgets_ListWidgets", + "parameters": { + "api-version": "2022-12-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fvnxroykqfpkhqg", + "manufacturerId": "llcnhdhnetxwqqih" + } + ] + } + } + } +} diff --git a/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/widgetanalytics.json b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/widgetanalytics.json new file mode 100644 index 000000000000..1dfb4694baea --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/stable/2022-12-01/widgetanalytics.json @@ -0,0 +1,565 @@ +{ + "swagger": "2.0", + "info": { + "title": "WidgetAnalytics", + "version": "2022-12-01", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "https://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://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_MaximumSet_Gen - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_ListWidgets_MaximumSet_Gen.json" + }, + "Widgets_ListWidgets_MaximumSet_Gen - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_ListWidgets_MinimumSet_Gen.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": { + "Widgets_GetWidget_MaximumSet_Gen - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_GetWidget_MaximumSet_Gen.json" + }, + "Widgets_GetWidget_MaximumSet_Gen - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_GetWidget_MinimumSet_Gen.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_MaximumSet_Gen - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_CreateOrUpdateWidget_MaximumSet_Gen.json" + }, + "Widgets_CreateOrUpdateWidget_MaximumSet_Gen - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_CreateOrUpdateWidget_MinimumSet_Gen.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": { + "Widgets_DeleteWidget_MaximumSet_Gen - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_DeleteWidget_MaximumSet_Gen.json" + }, + "Widgets_DeleteWidget_MaximumSet_Gen - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_DeleteWidget_MinimumSet_Gen.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_MaximumSet_Gen - generated by [MaximumSet] rule": { + "$ref": "./examples/Widgets_GetWidgetOperationStatus_MaximumSet_Gen.json" + }, + "Widgets_GetWidgetOperationStatus_MaximumSet_Gen - generated by [MinimumSet] rule": { + "$ref": "./examples/Widgets_GetWidgetOperationStatus_MinimumSet_Gen.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/azure/Guidelines.md#handling-errors.", + "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/widget/data-plane/WidgetAnalytics/tspconfig.yaml b/specification/widget/data-plane/WidgetAnalytics/tspconfig.yaml new file mode 100644 index 000000000000..c58e2cbb3dbc --- /dev/null +++ b/specification/widget/data-plane/WidgetAnalytics/tspconfig.yaml @@ -0,0 +1,47 @@ +parameters: + "service-dir": + default: "sdk/widgetanalytics" + "dependencies": + default: "" +emit: + - "@azure-tools/typespec-autorest" +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/data-plane" +options: + "@azure-tools/typespec-autorest": + # TODO: Does anything need this set, if it's not used in output-file? + azure-resource-provider-folder: "data-plane" + emit-lro-options: "none" + emitter-output-dir: "{project-root}" + output-file: "{version-status}/{version}/widgetanalytics.json" + "@azure-tools/typespec-python": + package-dir: "azure-widget-analytics" + namespace: "azure.widget.analytics" + generate-test: true + generate-sample: true + flavor: azure + "@azure-tools/typespec-csharp": + package-dir: "Azure.WidgetAnalytics" + clear-output-folder: true + model-namespace: false + namespace: "{package-dir}" + flavor: azure + "@azure-tools/typespec-ts": + package-dir: "widget-analytics-rest" + package-details: + name: "@azure-rest/azure-widget-analytics" + flavor: azure + "@azure-tools/typespec-java": + package-dir: "azure-widget-analytics" + namespace: com.azure.widget.analytics + flavor: azure + "@azure-tools/typespec-go": + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}" + service-dir: "sdk/widget-analytics" + package-dir: "azmanager" + module-version: "0.0.1" + generate-fakes: true + inject-spans: true + single-client: true + slice-elements-byval: true diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/employee.tsp b/specification/widget/resource-manager/Microsoft.Widget/Widget/employee.tsp new file mode 100644 index 000000000000..3c5e47132d00 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/employee.tsp @@ -0,0 +1,63 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; + +namespace Microsoft.Widget; + +/** Employee resource */ +model Employee is TrackedResource { + ...ResourceNameParameter; +} + +/** Employee properties */ +model EmployeeProperties { + /** Age of employee */ + age?: int32; + + /** City of employee */ + city?: string; + + /** Profile of employee */ + @encode("base64url") + profile?: bytes; + + /** The status of the last operation. */ + @visibility(Lifecycle.Read) + provisioningState?: ProvisioningState; +} + +/** The resource provisioning state. */ +@lroStatus +union ProvisioningState { + ResourceProvisioningState, + + /** The resource is being provisioned */ + Provisioning: "Provisioning", + + /** The resource is updating */ + Updating: "Updating", + + /** The resource is being deleted */ + Deleting: "Deleting", + + /** The resource create request has been accepted */ + Accepted: "Accepted", + + string, +} + +@armResourceOperations +interface Employees { + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + update is ArmResourcePatchSync; + delete is ArmResourceDeleteWithoutOkAsync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_CreateOrUpdate_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 000000000000..a3af131abb08 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1,70 @@ +{ + "title": "Employees_CreateOrUpdate - generated by [MaximumSet] rule", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "resource": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": {}, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Delete_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Delete_MaximumSet_Gen.json new file mode 100644 index 000000000000..8586354f43e8 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Delete_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Employees_Delete - generated by [MaximumSet] rule", + "operationId": "Employees_Delete", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Get_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Get_MaximumSet_Gen.json new file mode 100644 index 000000000000..a21eea104d5d --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Get_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "Employees_Get - generated by [MaximumSet] rule", + "operationId": "Employees_Get", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListByResourceGroup_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 000000000000..d5660e48aa0b --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,39 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MaximumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListByResourceGroup_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 000000000000..aac6dc9fbbf2 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MinimumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListBySubscription_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 000000000000..2a8ff19029f3 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "title": "Employees_ListBySubscription - generated by [MaximumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListBySubscription_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListBySubscription_MinimumSet_Gen.json new file mode 100644 index 000000000000..6c2fd32bf917 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_ListBySubscription_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Employees_ListBySubscription - generated by [MinimumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Update_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Update_MaximumSet_Gen.json new file mode 100644 index 000000000000..3085e3b07cd9 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Employees_Update_MaximumSet_Gen.json @@ -0,0 +1,43 @@ +{ + "title": "Employees_Update - generated by [MaximumSet] rule", + "operationId": "Employees_Update", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "properties": { + "tags": {}, + "properties": { + "age": 24, + "city": "uyfg", + "profile": "oapgijcswfkruiuuzbwco" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Operations_List_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Operations_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..9ab5ae5dade6 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Operations_List_MaximumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Operations_List - generated by [MaximumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ymeow", + "isDataAction": true, + "display": { + "provider": "qxyznq", + "resource": "bqfwkox", + "operation": "td", + "description": "eikaaucpxk" + }, + "origin": "user", + "actionType": "Internal" + } + ], + "nextLink": "https://sample.com/nextLink" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Operations_List_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Operations_List_MinimumSet_Gen.json new file mode 100644 index 000000000000..cf2263d386a4 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-10-01-preview/Operations_List_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Operations_List - generated by [MinimumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_CreateOrUpdate_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 000000000000..32cfae082fa2 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1,70 @@ +{ + "title": "Employees_CreateOrUpdate - generated by [MaximumSet] rule", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "resource": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": {}, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Delete_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Delete_MaximumSet_Gen.json new file mode 100644 index 000000000000..1b05a6cfc3ef --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Delete_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Employees_Delete - generated by [MaximumSet] rule", + "operationId": "Employees_Delete", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Get_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Get_MaximumSet_Gen.json new file mode 100644 index 000000000000..c8481cec0ed2 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Get_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "Employees_Get - generated by [MaximumSet] rule", + "operationId": "Employees_Get", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListByResourceGroup_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 000000000000..89c01db5ebf7 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,39 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MaximumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListByResourceGroup_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 000000000000..b9cacfccdbb9 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MinimumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListBySubscription_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 000000000000..ec5c4dffa801 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "title": "Employees_ListBySubscription - generated by [MaximumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListBySubscription_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListBySubscription_MinimumSet_Gen.json new file mode 100644 index 000000000000..3fe99d2bdff9 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_ListBySubscription_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Employees_ListBySubscription - generated by [MinimumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Update_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Update_MaximumSet_Gen.json new file mode 100644 index 000000000000..a81a21d9f317 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Employees_Update_MaximumSet_Gen.json @@ -0,0 +1,43 @@ +{ + "title": "Employees_Update - generated by [MaximumSet] rule", + "operationId": "Employees_Update", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "properties": { + "tags": {}, + "properties": { + "age": 24, + "city": "uyfg", + "profile": "oapgijcswfkruiuuzbwco" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Operations_List_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Operations_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..a668d0316933 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Operations_List_MaximumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Operations_List - generated by [MaximumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-11-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ymeow", + "isDataAction": true, + "display": { + "provider": "qxyznq", + "resource": "bqfwkox", + "operation": "td", + "description": "kfcrqmzuwfreqvh" + }, + "origin": "user", + "actionType": "Internal" + } + ], + "nextLink": "https://sample.com/nextLink" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Operations_List_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Operations_List_MinimumSet_Gen.json new file mode 100644 index 000000000000..a84301f66139 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/examples/2021-11-01/Operations_List_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Operations_List - generated by [MinimumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-11-01" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/main.tsp b/specification/widget/resource-manager/Microsoft.Widget/Widget/main.tsp new file mode 100644 index 000000000000..431a3e67a340 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/main.tsp @@ -0,0 +1,35 @@ +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./employee.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.ResourceManager; + +/** Microsoft.Widget Resource Provider management API. */ +@armProviderNamespace +@service(#{ title: "Widget" }) +@versioned(Microsoft.Widget.Versions) +namespace Microsoft.Widget; + +/** The available API versions. */ +enum Versions { + /** 2021-10-01-preview version */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + v2021_10_01_preview: "2021-10-01-preview", + + /** 2021-11-01 version */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + v2021_11_01: "2021-11-01", +} + +interface Operations extends Azure.ResourceManager.Operations {} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_CreateOrUpdate_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 000000000000..a3af131abb08 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1,70 @@ +{ + "title": "Employees_CreateOrUpdate - generated by [MaximumSet] rule", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "resource": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": {}, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Delete_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Delete_MaximumSet_Gen.json new file mode 100644 index 000000000000..8586354f43e8 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Delete_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Employees_Delete - generated by [MaximumSet] rule", + "operationId": "Employees_Delete", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Get_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Get_MaximumSet_Gen.json new file mode 100644 index 000000000000..a21eea104d5d --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Get_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "Employees_Get - generated by [MaximumSet] rule", + "operationId": "Employees_Get", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListByResourceGroup_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 000000000000..d5660e48aa0b --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,39 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MaximumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListByResourceGroup_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 000000000000..aac6dc9fbbf2 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MinimumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListBySubscription_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 000000000000..2a8ff19029f3 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "title": "Employees_ListBySubscription - generated by [MaximumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListBySubscription_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListBySubscription_MinimumSet_Gen.json new file mode 100644 index 000000000000..6c2fd32bf917 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_ListBySubscription_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Employees_ListBySubscription - generated by [MinimumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Update_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Update_MaximumSet_Gen.json new file mode 100644 index 000000000000..3085e3b07cd9 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Employees_Update_MaximumSet_Gen.json @@ -0,0 +1,43 @@ +{ + "title": "Employees_Update - generated by [MaximumSet] rule", + "operationId": "Employees_Update", + "parameters": { + "api-version": "2021-10-01-preview", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "properties": { + "tags": {}, + "properties": { + "age": 24, + "city": "uyfg", + "profile": "oapgijcswfkruiuuzbwco" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Operations_List_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Operations_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..9ab5ae5dade6 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Operations_List_MaximumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Operations_List - generated by [MaximumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ymeow", + "isDataAction": true, + "display": { + "provider": "qxyznq", + "resource": "bqfwkox", + "operation": "td", + "description": "eikaaucpxk" + }, + "origin": "user", + "actionType": "Internal" + } + ], + "nextLink": "https://sample.com/nextLink" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Operations_List_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Operations_List_MinimumSet_Gen.json new file mode 100644 index 000000000000..cf2263d386a4 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/examples/Operations_List_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Operations_List - generated by [MinimumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-10-01-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/widget.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/widget.json new file mode 100644 index 000000000000..2f9c53a6f691 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/preview/2021-10-01-preview/widget.json @@ -0,0 +1,566 @@ +{ + "swagger": "2.0", + "info": { + "title": "Widget", + "version": "2021-10-01-preview", + "description": "Microsoft.Widget Resource Provider management API.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Employees" + } + ], + "paths": { + "/providers/Microsoft.Widget/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Operations_List - generated by [MaximumSet] rule": { + "$ref": "./examples/Operations_List_MaximumSet_Gen.json" + }, + "Operations_List - generated by [MinimumSet] rule": { + "$ref": "./examples/Operations_List_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Widget/employees": { + "get": { + "operationId": "Employees_ListBySubscription", + "tags": [ + "Employees" + ], + "description": "List Employee resources by subscription ID", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_ListBySubscription - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_ListBySubscription_MaximumSet_Gen.json" + }, + "Employees_ListBySubscription - generated by [MinimumSet] rule": { + "$ref": "./examples/Employees_ListBySubscription_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Widget/employees": { + "get": { + "operationId": "Employees_ListByResourceGroup", + "tags": [ + "Employees" + ], + "description": "List Employee resources by resource group", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_ListByResourceGroup - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_ListByResourceGroup_MaximumSet_Gen.json" + }, + "Employees_ListByResourceGroup - generated by [MinimumSet] rule": { + "$ref": "./examples/Employees_ListByResourceGroup_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Widget/employees/{employeeName}": { + "get": { + "operationId": "Employees_Get", + "tags": [ + "Employees" + ], + "description": "Get a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_Get - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_Get_MaximumSet_Gen.json" + } + } + }, + "put": { + "operationId": "Employees_CreateOrUpdate", + "tags": [ + "Employees" + ], + "description": "Create a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Employee" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Employee' update operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "201": { + "description": "Resource 'Employee' create operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_CreateOrUpdate - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_CreateOrUpdate_MaximumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Employees_Update", + "tags": [ + "Employees" + ], + "description": "Update a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/EmployeeUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_Update - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_Update_MaximumSet_Gen.json" + } + } + }, + "delete": { + "operationId": "Employees_Delete", + "tags": [ + "Employees" + ], + "description": "Delete a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_Delete - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_Delete_MaximumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "Azure.ResourceManager.CommonTypes.TrackedResourceUpdate": { + "type": "object", + "title": "Tracked Resource", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ] + }, + "Employee": { + "type": "object", + "description": "Employee resource", + "properties": { + "properties": { + "$ref": "#/definitions/EmployeeProperties", + "description": "The resource-specific properties for this resource." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ] + }, + "EmployeeListResult": { + "type": "object", + "description": "The response of a Employee list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Employee items on this page", + "items": { + "$ref": "#/definitions/Employee" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "EmployeeProperties": { + "type": "object", + "description": "Employee properties", + "properties": { + "age": { + "type": "integer", + "format": "int32", + "description": "Age of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + }, + "profile": { + "type": "string", + "format": "base64url", + "description": "Profile of employee" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "EmployeeUpdate": { + "type": "object", + "description": "Employee resource", + "properties": { + "properties": { + "$ref": "#/definitions/EmployeeProperties", + "description": "The resource-specific properties for this resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.TrackedResourceUpdate" + } + ] + }, + "ProvisioningState": { + "type": "string", + "description": "The resource provisioning state.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning", + "Updating", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The resource is being provisioned" + }, + { + "name": "Updating", + "value": "Updating", + "description": "The resource is updating" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The resource is being deleted" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "The resource create request has been accepted" + } + ] + }, + "readOnly": true + } + }, + "parameters": {} +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/readme.md b/specification/widget/resource-manager/Microsoft.Widget/Widget/readme.md new file mode 100644 index 000000000000..940b553cc6e3 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/readme.md @@ -0,0 +1,54 @@ +# Widget + +> see https://aka.ms/autorest +> This is the AutoRest configuration file for Widget. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` +> To see additional help and options, run: + +> `autorest --help` +> For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings. + +```yaml +openapi-type: arm +openapi-subtype: rpaas +tag: package-2021-11-01 +``` + +### Tag: package-2021-11-01 + +These settings apply only when `--tag=package-2021-11-01` is specified on the command line. + +```yaml $(tag) == 'package-2021-11-01' +input-file: + - stable/2021-11-01/widget.json +suppressions: + - code: PathContainsResourceType + - code: PathResourceProviderMatchNamespace +``` + +### Tag: package-2021-10-01-preview + +These settings apply only when `--tag=package-2021-10-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2021-10-01-preview' +input-file: + - preview/2021-10-01-preview/widget.json +suppressions: + - code: PathContainsResourceType + - code: PathResourceProviderMatchNamespace +``` + +--- diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/shared.tsp b/specification/widget/resource-manager/Microsoft.Widget/Widget/shared.tsp new file mode 100644 index 000000000000..1b94bb705031 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/shared.tsp @@ -0,0 +1,8 @@ +@doc("Faked shared model") +model FakedSharedModel { + @doc("The tag.") + tag: string; + + @doc("The created date.") + createdAt: utcDateTime; +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_CreateOrUpdate_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_CreateOrUpdate_MaximumSet_Gen.json new file mode 100644 index 000000000000..32cfae082fa2 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_CreateOrUpdate_MaximumSet_Gen.json @@ -0,0 +1,70 @@ +{ + "title": "Employees_CreateOrUpdate - generated by [MaximumSet] rule", + "operationId": "Employees_CreateOrUpdate", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "resource": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms" + }, + "tags": {}, + "location": "itajgxyqozseoygnl" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + }, + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Delete_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Delete_MaximumSet_Gen.json new file mode 100644 index 000000000000..1b05a6cfc3ef --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Delete_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Employees_Delete - generated by [MaximumSet] rule", + "operationId": "Employees_Delete", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Get_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Get_MaximumSet_Gen.json new file mode 100644 index 000000000000..c8481cec0ed2 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Get_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "Employees_Get - generated by [MaximumSet] rule", + "operationId": "Employees_Get", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo" + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListByResourceGroup_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 000000000000..89c01db5ebf7 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,39 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MaximumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListByResourceGroup_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 000000000000..b9cacfccdbb9 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Employees_ListByResourceGroup - generated by [MinimumSet] rule", + "operationId": "Employees_ListByResourceGroup", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListBySubscription_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 000000000000..ec5c4dffa801 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "title": "Employees_ListBySubscription - generated by [MaximumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListBySubscription_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListBySubscription_MinimumSet_Gen.json new file mode 100644 index 000000000000..3fe99d2bdff9 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_ListBySubscription_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Employees_ListBySubscription - generated by [MinimumSet] rule", + "operationId": "Employees_ListBySubscription", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test" + } + ] + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Update_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Update_MaximumSet_Gen.json new file mode 100644 index 000000000000..a81a21d9f317 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Employees_Update_MaximumSet_Gen.json @@ -0,0 +1,43 @@ +{ + "title": "Employees_Update - generated by [MaximumSet] rule", + "operationId": "Employees_Update", + "parameters": { + "api-version": "2021-11-01", + "subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", + "resourceGroupName": "rgwidget", + "employeeName": "foo", + "properties": { + "tags": {}, + "properties": { + "age": 24, + "city": "uyfg", + "profile": "oapgijcswfkruiuuzbwco" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "age": 30, + "city": "gydhnntudughbmxlkyzrskcdkotrxn", + "profile": "ms", + "provisioningState": "Succeeded" + }, + "tags": {}, + "location": "itajgxyqozseoygnl", + "id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", + "name": "xepyxhpb", + "type": "svvamxrdnnv", + "systemData": { + "createdBy": "iewyxsnriqktsvp", + "createdByType": "User", + "createdAt": "2023-05-19T00:28:48.610Z", + "lastModifiedBy": "xrchbnnuzierzpxw", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-05-19T00:28:48.610Z" + } + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Operations_List_MaximumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Operations_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..a668d0316933 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Operations_List_MaximumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Operations_List - generated by [MaximumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-11-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ymeow", + "isDataAction": true, + "display": { + "provider": "qxyznq", + "resource": "bqfwkox", + "operation": "td", + "description": "kfcrqmzuwfreqvh" + }, + "origin": "user", + "actionType": "Internal" + } + ], + "nextLink": "https://sample.com/nextLink" + } + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Operations_List_MinimumSet_Gen.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Operations_List_MinimumSet_Gen.json new file mode 100644 index 000000000000..a84301f66139 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/examples/Operations_List_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Operations_List - generated by [MinimumSet] rule", + "operationId": "Operations_List", + "parameters": { + "api-version": "2021-11-01" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/widget.json b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/widget.json new file mode 100644 index 000000000000..99d6cc8187b6 --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/stable/2021-11-01/widget.json @@ -0,0 +1,566 @@ +{ + "swagger": "2.0", + "info": { + "title": "Widget", + "version": "2021-11-01", + "description": "Microsoft.Widget Resource Provider management API.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Employees" + } + ], + "paths": { + "/providers/Microsoft.Widget/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Operations_List - generated by [MaximumSet] rule": { + "$ref": "./examples/Operations_List_MaximumSet_Gen.json" + }, + "Operations_List - generated by [MinimumSet] rule": { + "$ref": "./examples/Operations_List_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Widget/employees": { + "get": { + "operationId": "Employees_ListBySubscription", + "tags": [ + "Employees" + ], + "description": "List Employee resources by subscription ID", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_ListBySubscription - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_ListBySubscription_MaximumSet_Gen.json" + }, + "Employees_ListBySubscription - generated by [MinimumSet] rule": { + "$ref": "./examples/Employees_ListBySubscription_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Widget/employees": { + "get": { + "operationId": "Employees_ListByResourceGroup", + "tags": [ + "Employees" + ], + "description": "List Employee resources by resource group", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_ListByResourceGroup - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_ListByResourceGroup_MaximumSet_Gen.json" + }, + "Employees_ListByResourceGroup - generated by [MinimumSet] rule": { + "$ref": "./examples/Employees_ListByResourceGroup_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Widget/employees/{employeeName}": { + "get": { + "operationId": "Employees_Get", + "tags": [ + "Employees" + ], + "description": "Get a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_Get - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_Get_MaximumSet_Gen.json" + } + } + }, + "put": { + "operationId": "Employees_CreateOrUpdate", + "tags": [ + "Employees" + ], + "description": "Create a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Employee" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Employee' update operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "201": { + "description": "Resource 'Employee' create operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_CreateOrUpdate - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_CreateOrUpdate_MaximumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Employees_Update", + "tags": [ + "Employees" + ], + "description": "Update a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/EmployeeUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_Update - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_Update_MaximumSet_Gen.json" + } + } + }, + "delete": { + "operationId": "Employees_Delete", + "tags": [ + "Employees" + ], + "description": "Delete a Employee", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "The name of the Employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Employees_Delete - generated by [MaximumSet] rule": { + "$ref": "./examples/Employees_Delete_MaximumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "Azure.ResourceManager.CommonTypes.TrackedResourceUpdate": { + "type": "object", + "title": "Tracked Resource", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ] + }, + "Employee": { + "type": "object", + "description": "Employee resource", + "properties": { + "properties": { + "$ref": "#/definitions/EmployeeProperties", + "description": "The resource-specific properties for this resource." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ] + }, + "EmployeeListResult": { + "type": "object", + "description": "The response of a Employee list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Employee items on this page", + "items": { + "$ref": "#/definitions/Employee" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "EmployeeProperties": { + "type": "object", + "description": "Employee properties", + "properties": { + "age": { + "type": "integer", + "format": "int32", + "description": "Age of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + }, + "profile": { + "type": "string", + "format": "base64url", + "description": "Profile of employee" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "EmployeeUpdate": { + "type": "object", + "description": "Employee resource", + "properties": { + "properties": { + "$ref": "#/definitions/EmployeeProperties", + "description": "The resource-specific properties for this resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.TrackedResourceUpdate" + } + ] + }, + "ProvisioningState": { + "type": "string", + "description": "The resource provisioning state.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning", + "Updating", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The resource is being provisioned" + }, + { + "name": "Updating", + "value": "Updating", + "description": "The resource is updating" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The resource is being deleted" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "The resource create request has been accepted" + } + ] + }, + "readOnly": true + } + }, + "parameters": {} +} diff --git a/specification/widget/resource-manager/Microsoft.Widget/Widget/tspconfig.yaml b/specification/widget/resource-manager/Microsoft.Widget/Widget/tspconfig.yaml new file mode 100644 index 000000000000..d8acdefe18da --- /dev/null +++ b/specification/widget/resource-manager/Microsoft.Widget/Widget/tspconfig.yaml @@ -0,0 +1,49 @@ +parameters: + "service-dir": + default: "sdk/widget" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + # TODO: Does anything need this set, if it's not used in output-file? Currently required by TSV. + azure-resource-provider-folder: "resource-manager" + output-file: "{version-status}/{version}/widget.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + "@azure-tools/typespec-csharp": + flavor: azure + package-dir: "Azure.ResourceManager.Widget" + clear-output-folder: true + model-namespace: true + namespace: "{package-dir}" + "@azure-tools/typespec-python": + package-dir: "azure-mgmt-widget" + namespace: "azure.mgmt.widget" + generate-test: true + generate-sample: true + flavor: "azure" + "@azure-tools/typespec-java": + package-dir: "azure-resourcemanager-widget" + namespace: "com.azure.resourcemanager.widget" + service-name: "Widget" # human-readable service name, whitespace allowed + flavor: azure + "@azure-tools/typespec-ts": + package-dir: "arm-widget" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure/arm-widget" + "@azure-tools/typespec-go": + service-dir: "sdk/resourcemanager/widget" + package-dir: "armwidget" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}" + fix-const-stuttering: true + flavor: "azure" + generate-samples: true + generate-fakes: true + head-as-boolean: true + inject-spans: true +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/specification/widget/resource-manager/readme.md b/specification/widget/resource-manager/readme.md new file mode 100644 index 000000000000..8c8bc7fb3777 --- /dev/null +++ b/specification/widget/resource-manager/readme.md @@ -0,0 +1,13 @@ +# Widget + +> see https://aka.ms/autorest +> This is the AutoRest configuration file for Widget. + +## Configuration + +Required if any services under this folder are RPaaS. + +```yaml +openapi-type: arm +openapi-subtype: rpaas +```