diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_export_specification.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_export_specification.py index 8d6c3171071..f41b9369402 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_export_specification.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_export_specification.py @@ -18,7 +18,7 @@ class ExportSpecification(AAZCommand): """Exports the API specification. :example: Export Specification - az apic api version definition export-specification -g api-center-test -s contosoeuap --api-id echo-api --version-id 2023-01-01 --definition-id default + az apic api definition export-specification -g api-center-test -s contosoeuap --api-id echo-api --version-id 2023-01-01 --definition-id default --file-name filename.json """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/version/_create.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/version/_create.py index 28b2b13e18f..dc73c752830 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/version/_create.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/version/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a new API version or update an existing API version. :example: Create API version - az apic api version create -g api-center-test -s contosoeuap --api-id echo-api --version-id 2023-01-01 --title "2023-01-01" + az apic api version create -g api-center-test -s contosoeuap --api-id echo-api --version-id 2023-01-01 --title "2023-01-01" --lifecycle-stage production """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api.yaml new file mode 100644 index 00000000000..8fa4e792fbd --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api.yaml @@ -0,0 +1,61 @@ +interactions: +- request: + body: '{"properties": {"kind": "rest", "title": "Echo API"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api create + Connection: + - keep-alive + Content-Length: + - '53' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --title --type + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/cli000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/cli000003","name":"cli000003","systemData":{"createdAt":"2024-05-24T07:50:59.3799269Z","lastModifiedAt":"2024-05-24T07:50:59.3799259Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '464' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:50:59 GMT + etag: + - 3000bd3e-0000-0100-0000-665046e30000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 73675F9FA6514297956723A9D39BBF2E Ref B: MAA201060516009 Ref C: 2024-05-24T07:50:57Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_definition.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_definition.yaml new file mode 100644 index 00000000000..5dc2d25bbac --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_definition.yaml @@ -0,0 +1,62 @@ +interactions: +- request: + body: '{"properties": {"title": "OpenAPI"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition create + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --version-id --definition-id --title + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/cli000005?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"OpenAPI"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/cli000005","name":"cli000005","systemData":{"createdAt":"2024-05-27T02:27:49.1479171Z","lastModifiedAt":"2024-05-27T02:27:49.1479161Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '456' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:27:48 GMT + etag: + - 52001a88-0000-0100-0000-6653efa50000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: C892758C6B5D4E91A3A952F40191D328 Ref B: MAA201060515039 Ref C: 2024-05-27T02:27:48Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_version.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_version.yaml new file mode 100644 index 00000000000..fe500ea48a3 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_version.yaml @@ -0,0 +1,62 @@ +interactions: +- request: + body: '{"properties": {"lifecycleStage": "production", "title": "2023-01-01"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version create + Connection: + - keep-alive + Content-Length: + - '71' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --version-id --title --lifecycle-stage + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/cli000004?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"2023-01-01","lifecycleStage":"production"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/cli000004","name":"cli000004","systemData":{"createdAt":"2024-05-27T03:00:25.3664586Z","lastModifiedAt":"2024-05-27T03:00:25.3664577Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '451' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:00:25 GMT + etag: + - 9b013724-0000-0100-0000-6653f7490000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 2EE67EE9E32D48F480C42CDA128D284F Ref B: MAA201060515031 Ref C: 2024-05-27T03:00:24Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_with_custom_properties.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_with_custom_properties.yaml new file mode 100644 index 00000000000..98c3352cff9 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_api_with_custom_properties.yaml @@ -0,0 +1,62 @@ +interactions: +- request: + body: '{"properties": {"customProperties": {"clitest000003": true}, "kind": "rest", + "title": "Echo API"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api create + Connection: + - keep-alive + Content-Length: + - '98' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --title --type --custom-properties + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/cli000004?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{"clitest000003":true}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/cli000004","name":"cli000004","systemData":{"createdAt":"2024-05-24T07:51:19.9191143Z","lastModifiedAt":"2024-05-24T07:51:19.9190948Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '484' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:51:19 GMT + etag: + - 3000c940-0000-0100-0000-665046f70000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-msedge-ref: + - 'Ref A: 9BC575065296493C944EFF1CBFEA5ECF Ref B: MAA201060514033 Ref C: 2024-05-24T07:51:18Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_deployment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_deployment.yaml new file mode 100644 index 00000000000..1c72f320c26 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_deployment.yaml @@ -0,0 +1,66 @@ +interactions: +- request: + body: '{"properties": {"definitionId": "/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006", + "description": "Public cloud production deployment.", "environmentId": "/workspaces/default/environments/clitest000003", + "server": {"runtimeUri": ["https://example.com"]}, "title": "Production deployment"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api deployment create + Connection: + - keep-alive + Content-Length: + - '329' + Content-Type: + - application/json + ParameterSetName: + - -g -s --deployment-id --title --description --api-id --environment-id --definition-id + --server + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"Production + deployment","description":"Public cloud production deployment.","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/cli000007","name":"cli000007","systemData":{"createdAt":"2024-05-27T02:27:55.2453007Z","lastModifiedAt":"2024-05-27T02:27:55.2452997Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '750' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:27:55 GMT + etag: + - 3a01e800-0000-0100-0000-6653efab0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 1BC0114248E04A5D83F10D5D319640C6 Ref B: MAA201060516049 Ref C: 2024-05-27T02:27:54Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_environment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_environment.yaml new file mode 100644 index 00000000000..3ae14d950c0 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_environment.yaml @@ -0,0 +1,61 @@ +interactions: +- request: + body: '{"properties": {"kind": "development", "title": "Public cloud"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic environment create + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - -g -s --environment-id --title --type + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/cli000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"Public + cloud","kind":"development","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/cli000003","name":"cli000003","systemData":{"createdAt":"2024-05-24T07:51:06.6386454Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '402' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:51:05 GMT + etag: + - 2500f1d8-0000-0100-0000-665046ea0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-msedge-ref: + - 'Ref A: 177FE32340EA4BFBA93D2D1E97609CEB Ref B: MAA201060515011 Ref C: 2024-05-24T07:51:05Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_metadata_1.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_metadata_1.yaml new file mode 100644 index 00000000000..162a3235a68 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_metadata_1.yaml @@ -0,0 +1,63 @@ +interactions: +- request: + body: '{"properties": {"assignedTo": [{"deprecated": false, "entity": "api", "required": + true}], "schema": "{\"type\":\"string\", \"title\":\"First name\", \"pattern\": + \"^[a-zA-Z0-9]+$\"}"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata create + Connection: + - keep-alive + Content-Length: + - '184' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --service-name --name --schema --assignments + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/cli000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false}],"schema":"{\"type\":\"string\", + \"title\":\"First name\", \"pattern\": \"^[a-zA-Z0-9]+$\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/cli000003","name":"cli000003","systemData":{"createdAt":"2024-05-24T07:00:27.1869547Z","lastModifiedAt":"2024-05-24T07:00:27.186954Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '518' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:27 GMT + etag: + - 21004873-0000-0100-0000-66503b0b0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 771DFC4A273E43AF80D2B3F74D4D357D Ref B: MAA201060516053 Ref C: 2024-05-24T07:00:25Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_metadata_2.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_metadata_2.yaml new file mode 100644 index 00000000000..05bd595cc9b --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_metadata_2.yaml @@ -0,0 +1,62 @@ +interactions: +- request: + body: '{"properties": {"assignedTo": [{"deprecated": false, "entity": "api", "required": + true}, {"deprecated": false, "entity": "environment", "required": true}], "schema": + "{\"type\":\"string\",\"title\":\"testregion\",\"oneOf\":[{\"const\":\"Region1\",\"description\":\"\"},{\"const\":\"Region2\",\"description\":\"\"},{\"const\":\"Region3\",\"description\":\"\"}]}"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata create + Connection: + - keep-alive + Content-Length: + - '363' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --service-name --name --schema --assignments + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/cli000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false},{"entity":"environment","required":true,"deprecated":false}],"schema":"{\"type\":\"string\",\"title\":\"testregion\",\"oneOf\":[{\"const\":\"Region1\",\"description\":\"\"},{\"const\":\"Region2\",\"description\":\"\"},{\"const\":\"Region3\",\"description\":\"\"}]}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/cli000003","name":"cli000003","systemData":{"createdAt":"2024-05-24T07:00:44.9559411Z","lastModifiedAt":"2024-05-24T07:00:44.9559389Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '692' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:44 GMT + etag: + - 21002e76-0000-0100-0000-66503b1c0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: F410C24032D94D5C9A19F60B3B30CA99 Ref B: MAA201060515009 Ref C: 2024-05-24T07:00:43Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_service_1.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_service_1.yaml new file mode 100644 index 00000000000..1797bbc1eed --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_service_1.yaml @@ -0,0 +1,58 @@ +interactions: +- request: + body: '{"location": "eastus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic service create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - -g -s -l + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/cli000002?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services","location":"eastus","sku":{"name":"Free"},"properties":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/cli000002","name":"cli000002","tags":{},"systemData":{"createdAt":"2024-05-24T05:46:34.3459347Z","lastModifiedAt":"2024-05-24T05:46:34.3459249Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '367' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 05:46:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 509E6054B1FB4DF68EB4C56E786F98AD Ref B: MAA201060515047 Ref C: 2024-05-24T05:46:30Z' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_service_2.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_service_2.yaml new file mode 100644 index 00000000000..582bd7afea7 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_create_service_2.yaml @@ -0,0 +1,58 @@ +interactions: +- request: + body: '{"location": "eastus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic service create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/cli000002?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services","location":"eastus","sku":{"name":"Free"},"properties":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/cli000002","name":"cli000002","tags":{},"systemData":{"createdAt":"2024-05-24T05:46:55.6722533Z","lastModifiedAt":"2024-05-24T05:46:55.6722404Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '367' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 05:46:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 72AF88949E41416AB5F1D7F2DB13F77F Ref B: MAA201060513011 Ref C: 2024-05-24T05:46:52Z' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api.yaml new file mode 100644 index 00000000000..eeac5d1d218 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s --api-id --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + date: + - Fri, 24 May 2024 07:52:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-msedge-ref: + - 'Ref A: 63A0B0AF81C74BD5A52EBD1DD5A0CC02 Ref B: MAA201060514045 Ref C: 2024-05-24T07:52:25Z' + x-powered-by: + - ASP.NET + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api show + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:52:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: EFBE0ED7D20B458EA2A889DAAD0BFECE Ref B: MAA201060515011 Ref C: 2024-05-24T07:52:33Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_definition.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_definition.yaml new file mode 100644 index 00000000000..a50925a832b --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_definition.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s --api-id --version-id --definition-id --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 27 May 2024 02:28:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 2BBA072442334A2CA90EDA263070AB2D Ref B: MAA201060513023 Ref C: 2024-05-27T02:28:11Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition show + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:28:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 48744049952A4DEE9403FD521E3BA630 Ref B: MAA201060513029 Ref C: 2024-05-27T02:28:14Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_deployment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_deployment.yaml new file mode 100644 index 00000000000..08a3eb95a44 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_deployment.yaml @@ -0,0 +1,104 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api deployment delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s --deployment-id --api-id --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + date: + - Mon, 27 May 2024 02:28:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: F8FB7C393C604B5FBA7979529E868CF7 Ref B: MAA201060513023 Ref C: 2024-05-27T02:28:23Z' + x-powered-by: + - ASP.NET + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api deployment show + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --deployment-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:28:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: AAC002195375400AB6329BBC73F09684 Ref B: MAA201060516033 Ref C: 2024-05-27T02:28:25Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_version.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_version.yaml new file mode 100644 index 00000000000..8c415290c6d --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_api_version.yaml @@ -0,0 +1,104 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s --api-id --version-id --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + date: + - Mon, 27 May 2024 02:54:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 0D3A14A06E764D1894CDC7898FD2E26C Ref B: MAA201060515045 Ref C: 2024-05-27T02:54:12Z' + x-powered-by: + - ASP.NET + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version show + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:54:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: BE5F8A88540A45E79457E230637075B8 Ref B: MAA201060513035 Ref C: 2024-05-27T02:54:15Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_environment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_environment.yaml new file mode 100644 index 00000000000..68d37faf4c6 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_environment.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic environment delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s --environment-id --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + date: + - Fri, 24 May 2024 07:15:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-msedge-ref: + - 'Ref A: AEBFAE48314349FFA1AC027B9BC4F810 Ref B: MAA201060513051 Ref C: 2024-05-24T07:15:06Z' + x-powered-by: + - ASP.NET + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic environment show + Connection: + - keep-alive + ParameterSetName: + - -g -s --environment-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"code":"404","message":"Subscription not found","target":"1756abc0-3554-4341-8d6a-46674962ea19"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:15:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 58C9CBB38D354AA88672482AC7DA2295 Ref B: MAA201060516027 Ref C: 2024-05-24T07:15:08Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_metadata_1.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_metadata_1.yaml new file mode 100644 index 00000000000..6c7a5d48ff6 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_metadata_1.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --service-name --name --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + date: + - Fri, 24 May 2024 07:00:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-msedge-ref: + - 'Ref A: DBDE3B1E3C9C4FE9B1F09A657F68FE4D Ref B: MAA201060514031 Ref C: 2024-05-24T07:00:23Z' + x-powered-by: + - ASP.NET + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --service-name --name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 3EAF251DC5AE45CCB7B2409714C4BAF1 Ref B: MAA201060516049 Ref C: 2024-05-24T07:00:25Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_metadata_2.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_metadata_2.yaml new file mode 100644 index 00000000000..8950619b228 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_metadata_2.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s --name --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + date: + - Fri, 24 May 2024 07:00:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-msedge-ref: + - 'Ref A: D0C262977DD541EB8F14A2797D83B1D6 Ref B: MAA201060514029 Ref C: 2024-05-24T07:00:43Z' + x-powered-by: + - ASP.NET + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata show + Connection: + - keep-alive + ParameterSetName: + - -g -s --name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 46B8B5E8221C483FAA507F61026EE7F6 Ref B: MAA201060514035 Ref C: 2024-05-24T07:00:46Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_service.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_service.yaml new file mode 100644 index 00000000000..80e04db0dee --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_delete_service.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic service delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -s -g --yes + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 24 May 2024 05:46:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-msedge-ref: + - 'Ref A: F1D92E654B8B4433932F49EA06343EDB Ref B: MAA201060515019 Ref C: 2024-05-24T05:46:40Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic service show + Connection: + - keep-alive + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002?api-version=2024-03-01 + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.ApiCenter/services/clitest000002'' + under resource group ''clirg000001'' was not found. For more details please + go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '225' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 05:46:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + x-msedge-ref: + - 'Ref A: 473DD5C3618F432C9431573DEA3B5761 Ref B: MAA201060514023 Ref C: 2024-05-24T05:46:48Z' + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_api.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_api.yaml new file mode 100644 index 00000000000..5ec4d42bab2 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_api.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + body: '{"assignedTo": "api"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata export + Connection: + - keep-alive + Content-Length: + - '21' + Content-Type: + - application/json + ParameterSetName: + - -g -s --assignments --file-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/exportMetadataSchema?api-version=2024-03-01 + response: + body: + string: '{"format":"json-schema","value":"{\"type\":\"object\",\"properties\":{\"Id\":{\"type\":\"string\"},\"Name\":{\"type\":\"string\"},\"WorkspaceName\":{\"type\":\"string\"},\"Title\":{\"type\":\"string\"},\"Summary\":{\"type\":\"string\"},\"Description\":{\"type\":\"string\"},\"Kind\":{\"type\":\"string\"},\"LifecycleStage\":{\"type\":\"string\",\"enum\":[\"design\",\"development\",\"testing\",\"preview\",\"production\",\"deprecated\",\"retired\"]},\"TermsOfService\":{\"type\":\"object\",\"properties\":{\"url\":{\"description\":\"URL + pointing to the terms of service.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"}}},\"License\":{\"type\":\"object\",\"properties\":{\"name\":{\"description\":\"Name + of the license.\",\"type\":\"string\",\"maxLength\":50},\"url\":{\"description\":\"URL + pointing to the license details. The URL field is mutually exclusive of the + identifier field.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"},\"identifier\":{\"description\":\"SPDX + license information for the API. The identifier field is mutually exclusive + of the URL field.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"}}},\"ExternalDocumentation\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"title\":{\"description\":\"Title + of the documentation.\",\"type\":\"string\",\"maxLength\":50},\"description\":{\"description\":\"Description + of the documentation.\",\"type\":\"string\",\"maxLength\":1000},\"url\":{\"description\":\"URL + pointing to the documentation.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"}}}},\"Contacts\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"description\":\"Name + of the contact.\",\"type\":\"string\",\"maxLength\":100},\"url\":{\"description\":\"URL + for the contact.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"},\"email\":{\"description\":\"Email + address for the contact.\",\"type\":\"string\",\"maxLength\":100,\"format\":\"email\"}}}},\"CustomPropertiesData\":{},\"CatalogNameTypeSafe\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"Name\":{\"type\":\"string\"}}},\"CatalogName\":{\"type\":\"string\"},\"SubscriptionId\":{\"type\":\"string\"},\"SubscriptionIdTypeSafe\":{\"type\":\"string\"},\"ResourceGroupName\":{\"type\":\"string\"},\"ResourceGroupNameTypeSafe\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"Name\":{\"type\":\"string\"}}},\"ETag\":{\"type\":\"string\"},\"Created\":{\"type\":\"string\",\"format\":\"date-time\"},\"Updated\":{\"type\":\"string\",\"format\":\"date-time\"},\"CreatedBy\":{\"type\":\"string\"},\"UpdatedBy\":{\"type\":\"string\"},\"customProperties\":{\"type\":\"object\",\"properties\":{\"clitest000003\":{\"type\":\"boolean\",\"title\":\"Public + Facing\"}},\"unevaluatedProperties\":false,\"required\":[\"clitest000003\"]}}}"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '2854' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:01:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 6752A6AD268A4FE5A09F67818CC0DEED Ref B: MAA201060514045 Ref C: 2024-05-24T07:01:05Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_deployment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_deployment.yaml new file mode 100644 index 00000000000..a20071035a5 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_deployment.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: '{"assignedTo": "deployment"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata export + Connection: + - keep-alive + Content-Length: + - '28' + Content-Type: + - application/json + ParameterSetName: + - -g -s --assignments --file-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/exportMetadataSchema?api-version=2024-03-01 + response: + body: + string: '{"format":"json-schema","value":"{\"type\":\"object\",\"properties\":{\"Id\":{\"type\":\"string\"},\"WorkspaceName\":{\"type\":\"string\"},\"ApiName\":{\"type\":\"string\"},\"Name\":{\"type\":\"string\"},\"Title\":{\"type\":\"string\"},\"Description\":{\"type\":\"string\"},\"EnvironmentId\":{\"type\":\"string\"},\"DefinitionId\":{\"type\":\"string\"},\"Server\":{\"type\":\"object\",\"properties\":{\"runtimeUri\":{\"description\":\"Base + runtime URIs for this deployment.\",\"type\":\"array\",\"items\":{\"type\":\"string\"},\"maxItems\":200}},\"required\":[\"runtimeUri\"]},\"CustomPropertiesData\":{},\"Recommended\":{\"type\":\"boolean\"},\"CatalogNameTypeSafe\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"Name\":{\"type\":\"string\"}}},\"CatalogName\":{\"type\":\"string\"},\"SubscriptionId\":{\"type\":\"string\"},\"SubscriptionIdTypeSafe\":{\"type\":\"string\"},\"ResourceGroupName\":{\"type\":\"string\"},\"ResourceGroupNameTypeSafe\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"Name\":{\"type\":\"string\"}}},\"ETag\":{\"type\":\"string\"},\"Created\":{\"type\":\"string\",\"format\":\"date-time\"},\"Updated\":{\"type\":\"string\",\"format\":\"date-time\"},\"CreatedBy\":{\"type\":\"string\"},\"UpdatedBy\":{\"type\":\"string\"},\"customProperties\":{\"type\":\"object\",\"properties\":{\"clitest000003\":{\"type\":\"boolean\",\"title\":\"Public + Facing\"}},\"unevaluatedProperties\":false,\"required\":[\"clitest000003\"]}}}"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '1490' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:01:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 74FC23DA8C054A4E9F947B16D63BD741 Ref B: MAA201060514049 Ref C: 2024-05-24T07:01:25Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_environment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_environment.yaml new file mode 100644 index 00000000000..9bc1f2087c1 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_metadata_assigned_to_environment.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: '{"assignedTo": "environment"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata export + Connection: + - keep-alive + Content-Length: + - '29' + Content-Type: + - application/json + ParameterSetName: + - -g -s --assignments --file-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/exportMetadataSchema?api-version=2024-03-01 + response: + body: + string: '{"format":"json-schema","value":"{\"type\":\"object\",\"properties\":{\"Id\":{\"type\":\"string\"},\"WorkspaceName\":{\"type\":\"string\"},\"Name\":{\"type\":\"string\"},\"title\":{\"description\":\"The + name of the environment.\",\"type\":\"string\",\"maxLength\":50},\"kind\":{\"description\":\"Kind + of deployment environment.\",\"type\":\"string\"},\"description\":{\"description\":\"Description + of the environment.\",\"type\":\"string\",\"maxLength\":1000},\"server\":{\"description\":\"Server + information of the environment.\",\"type\":\"object\",\"properties\":{\"type\":{\"description\":\"Type + of the server that represents the environment.\",\"type\":\"string\"},\"managementPortalUri\":{\"description\":\"URIs + of the server''s management portal.\",\"type\":\"array\",\"items\":{\"type\":\"string\"},\"maxItems\":200}}},\"onboarding\":{\"description\":\"Onboarding + information for this environment.\",\"type\":\"object\",\"properties\":{\"instructions\":{\"description\":\"Instructions + how to onboard to the environment.\",\"type\":\"string\",\"maxLength\":1000},\"developerPortalUri\":{\"description\":\"Developer + portal URIs of the environment.\",\"type\":\"array\",\"items\":{\"type\":\"string\"},\"maxItems\":200}}},\"customProperties\":{\"type\":\"object\",\"properties\":{\"clitest000003\":{\"type\":\"boolean\",\"title\":\"Public + Facing\"}},\"unevaluatedProperties\":false,\"required\":[\"clitest000003\"]},\"CatalogNameTypeSafe\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"Name\":{\"type\":\"string\"}}},\"CatalogName\":{\"type\":\"string\"},\"SubscriptionId\":{\"type\":\"string\"},\"SubscriptionIdTypeSafe\":{\"type\":\"string\"},\"ResourceGroupName\":{\"type\":\"string\"},\"ResourceGroupNameTypeSafe\":{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"Name\":{\"type\":\"string\"}}},\"ETag\":{\"type\":\"string\"},\"Created\":{\"type\":\"string\",\"format\":\"date-time\"},\"Updated\":{\"type\":\"string\",\"format\":\"date-time\"},\"CreatedBy\":{\"type\":\"string\"},\"UpdatedBy\":{\"type\":\"string\"}},\"required\":[\"title\",\"kind\"]}"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '2106' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 1861A31F0D5A416EA51E761E849572B6 Ref B: MAA201060513051 Ref C: 2024-05-24T07:00:27Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_specification.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_specification.yaml new file mode 100644 index 00000000000..804444c26d4 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_specification.yaml @@ -0,0 +1,268 @@ +interactions: +- request: + body: '{"format": "link", "specification": {"name": "openapi", "version": "3.0.0"}, + "value": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + Content-Length: + - '181' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/importSpecification?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 27 May 2024 03:03:23 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/b4cea96c5fcd4c26887810554e58f664?api-version=2024-03-01&t=638523758031302138&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQo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v7z3JFkXFsN7jcHBQDn2YqE7eFoPVqmoQtJZXXzAsWMeqSilE2wmsqn8Ty0ykZnqcfjuRNXoTC9CpuEhZYirAwmdBN87Cb7ZrhR2s8flm-uIqdEhk4mWeNMEyWsm5RLA&s=GUBMch1t0mcpPWhD1JhjChdutz-L_PbONoKgTJ7Ze-lpDSrb9V45t5mTR47cE7zbW1N13bdLwbKAj8svSXyQSIfcv1NaK8OoywK_V6ujQKB_tFh52CCT3prxb5zFtY72UYXJFT9yuJZceLljONk0Mr-CQ3AAk31JCGyQB_-86nhEeVvgS6EQV3Dwc6W4zpTWn0mPSiBoFTaFIhX1JrNfZ1u9yU3ZvvI6MK5GqBJfyUHnhaow7iM_eIpNm8w0P3fHMfIT3qKOo-eGZEYBFj1S1QUBiFNcyIMMjiQVU6s8XQH9T-Svx1EnGenrdtIMQ6Xt8bKunEog5pTzlEg3ozPFVw&h=VWirjaRGpxArqY4TK8bO0zQciMyQCrhFZI31eaRpogE + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 633710230E7C4D87A5E49279107E3B43 Ref B: MAA201060514035 Ref C: 2024-05-27T03:03:21Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/oper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ADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD-urQp96AuB916E-Te8RmgK90YXOfxpQ9UFVrx1h5G83WkRUIlKdESHrUjduIESxCRdkRY2ntf__S09h5_4l7f3rT0jpHXw-_8dUrAbn43jMiQmB2LXzLoyIWaLagT18F_wbUAmRMU1m1WEJE66ngt8mx407-SRKz6rKaPUCD2z-wIeSOcaXXY7KbRVUtbPS4GhSTo3fCRHPGpXS9ftpm-v7z3JFkXFsN7jcHBQDn2YqE7eFoPVqmoQtJZXXzAsWMeqSilE2wmsqn8Ty0ykZnqcfjuRNXoTC9CpuEhZYirAwmdBN87Cb7ZrhR2s8flm-uIqdEhk4mWeNMEyWsm5RLA&s=GUBMch1t0mcpPWhD1JhjChdutz-L_PbONoKgTJ7Ze-lpDSrb9V45t5mTR47cE7zbW1N13bdLwbKAj8svSXyQSIfcv1NaK8OoywK_V6ujQKB_tFh52CCT3prxb5zFtY72UYXJFT9yuJZceLljONk0Mr-CQ3AAk31JCGyQB_-86nhEeVvgS6EQV3Dwc6W4zpTWn0mPSiBoFTaFIhX1JrNfZ1u9yU3ZvvI6MK5GqBJfyUHnhaow7iM_eIpNm8w0P3fHMfIT3qKOo-eGZEYBFj1S1QUBiFNcyIMMjiQVU6s8XQH9T-Svx1EnGenrdtIMQ6Xt8bKunEog5pTzlEg3ozPFVw&h=VWirjaRGpxArqY4TK8bO0zQciMyQCrhFZI31eaRpogE + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/b4cea96c5fcd4c26887810554e58f664","name":"b4cea96c5fcd4c26887810554e58f664","status":"NotStarted"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '322' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:03:26 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/b4cea96c5fcd4c26887810554e58f664?api-version=2024-03-01&t=638523758064601670&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm-rUyPQv0z_LgvMVxRmSGe7k2sSDcjhZtJtacrGF0aA0mXhldjASVDsIKbducmYozS8YVn2yXvxW_2yo82m2q934keEf1UEKaSADUrozDPX5msTyt18UcXAPp7vPi8MXbYjFOyyuc1uzgXltAbdS5P2ki32RUjUplv8OZZSK5OvCrsyCwkmsg2yKxfHaRObmPqpu65x8lFk2jKBDK30LBTk2StP96kJI1VnIe3fxGXE6_1XKZTCJH9o_4vYvmA3wTHxlu8KWljLk10ttEqy736mEq9ex8TqnJVHebwRZ33UQTFZClqhQrIcLUrar5PXwlFMtvhgI1-Du5tVtKr1KECAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYB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5c25_U8hwTdRqJnboO-bR0YtE2mWnVcgG3TdbQ&h=2ZLfgJtXdLOFM6e2ENNa-fRRWSv9-k4jQ37ZWr9Mq_Y + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 313C794D2760493DAFF051EE538D8B55 Ref B: MAA201060514035 Ref C: 2024-05-27T03:03:23Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/b4cea96c5fcd4c26887810554e58f664?api-version=2024-03-01&t=638523758064601670&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm-rUyPQv0z_LgvMVxRmSGe7k2sSDcjhZtJtacrGF0aA0mXhldjASVDsIKbduc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nqcfjuRNXoTC9CpuEhZYirAwmdBN87Cb7ZrhR2s8flm-uIqdEhk4mWeNMEyWsm5RLA&s=JO8H_Q94Lom6anZA-vFblQAGTutMNjNiZC3NhOY2YpYLmoBdg3km5O4ZreGrnvlpplwsAymSQME6lbCttJTCMrA101dPUt70MWLNm3WLsws0QS9h1de1wmnxkYzM3Ti4e9iY_oo2MOYFRTzYcG4Vi0XexCtm3Rsk3YIgZnLkVfa41Vac1KUCc6X6MwFsuU79HnQtlrXRsN1SodqfRnRO86W8yDG-ojZKDy-JpLMP24o4Rq2WewcpO82HGqZ-dfxkPMyC0FE2QyUJJNXR4oRfoUjknmVJJJbHe9gL2F1_dl7wM_FB5c25_U8hwTdRqJnboO-bR0YtE2mWnVcgG3TdbQ&h=2ZLfgJtXdLOFM6e2ENNa-fRRWSv9-k4jQ37ZWr9Mq_Y + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/b4cea96c5fcd4c26887810554e58f664","name":"b4cea96c5fcd4c26887810554e58f664","status":"Succeeded","startTime":"2024-05-27T03:03:47.1805506+00:00","endTime":"2024-05-27T03:03:50.6366235+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '415' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:03:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 82D9DDC54C0D48158C7E6ACE7B5CE0F9 Ref B: MAA201060514035 Ref C: 2024-05-27T03:03:56Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition export-specification + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s --api-id --version-id --definition-id --file-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/exportSpecification?api-version=2024-03-01 + response: + body: + string: '{"format":"inline","value":"{\n \"openapi\": \"3.0.0\",\n \"info\": + {\n \"version\": \"1.0.0\",\n \"title\": \"Swagger Petstore\",\n \"license\": + {\n \"name\": \"MIT\"\n }\n },\n \"servers\": [\n {\n \"url\": + \"http://petstore.swagger.io/v1\"\n }\n ],\n \"paths\": {\n \"/pets\": + {\n \"get\": {\n \"summary\": \"List all pets\",\n \"operationId\": + \"listPets\",\n \"tags\": [\n \"pets\"\n ],\n \"parameters\": + [\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"description\": + \"How many items to return at one time (max 100)\",\n \"required\": + false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": + 100,\n \"format\": \"int32\"\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": \"A paged array of pets\",\n \"headers\": + {\n \"x-next\": {\n \"description\": \"A link + to the next page of responses\",\n \"schema\": {\n \"type\": + \"string\"\n }\n }\n },\n \"content\": + {\n \"application/json\": {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pets\"\n }\n }\n }\n },\n \"default\": + {\n \"description\": \"unexpected error\",\n \"content\": + {\n \"application/json\": {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Error\"\n }\n }\n }\n }\n }\n },\n \"post\": + {\n \"summary\": \"Create a pet\",\n \"operationId\": \"createPets\",\n \"tags\": + [\n \"pets\"\n ],\n \"requestBody\": {\n \"content\": + {\n \"application/json\": {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n },\n \"required\": + true\n },\n \"responses\": {\n \"201\": {\n \"description\": + \"Null response\"\n },\n \"default\": {\n \"description\": + \"unexpected error\",\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Error\"\n }\n }\n }\n }\n }\n }\n },\n \"/pets/{petId}\": + {\n \"get\": {\n \"summary\": \"Info for a specific pet\",\n \"operationId\": + \"showPetById\",\n \"tags\": [\n \"pets\"\n ],\n \"parameters\": + [\n {\n \"name\": \"petId\",\n \"in\": \"path\",\n \"required\": + true,\n \"description\": \"The id of the pet to retrieve\",\n \"schema\": + {\n \"type\": \"string\"\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": \"Expected response + to a valid request\",\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n }\n }\n },\n \"default\": + {\n \"description\": \"unexpected error\",\n \"content\": + {\n \"application/json\": {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Error\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"components\": + {\n \"schemas\": {\n \"Pet\": {\n \"type\": \"object\",\n \"required\": + [\n \"id\",\n \"name\"\n ],\n \"properties\": + {\n \"id\": {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"tag\": + {\n \"type\": \"string\"\n }\n }\n },\n \"Pets\": + {\n \"type\": \"array\",\n \"maxItems\": 100,\n \"items\": + {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n },\n \"Error\": + {\n \"type\": \"object\",\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"properties\": + {\n \"code\": {\n \"type\": \"integer\",\n \"format\": + \"int32\"\n },\n \"message\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '4805' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:04:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 6B1908D4BF234326B47AB213F1F6AC90 Ref B: MAA201060514011 Ref C: 2024-05-27T03:03:59Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_1.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_1.yaml new file mode 100644 index 00000000000..ca44c25cad9 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_1.yaml @@ -0,0 +1,58 @@ +interactions: +- request: + body: '{"format": "inline", "specification": {"name": "openapi", "version": "3.0.0"}, + "value": "{\"openapi\":\"3.0.1\",\"info\":{\"title\":\"httpbin.org\",\"description\":\"API + Management facade for a very handy and free online HTTP tool.\",\"version\":\"1.0\"}}"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + Content-Length: + - '257' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/importSpecification?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 27 May 2024 02:39:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: DE10DD2707FE4DAAB00EC673D5785F53 Ref B: MAA201060513037 Ref C: 2024-05-27T02:39:27Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_2.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_2.yaml new file mode 100644 index 00000000000..d0f2a02a686 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_2.yaml @@ -0,0 +1,273 @@ +interactions: +- request: + body: '{"format": "link", "specification": {"name": "openapi", "version": "3.0.0"}, + "value": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + Content-Length: + - '181' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/importSpecification?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 27 May 2024 02:38:58 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523743393542866&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm-rUyPQv0z_LgvMVxRmSGe7k2sSDcjhZtJtacrGF0aA0mXhldjASVDsIKbducmYozS8YVn2yXvxW_2yo82m2q934keEf1UEKaSADUrozDPX5msTyt18UcXAPp7vPi8MXbYjFOyyuc1uzgXltAbdS5P2ki32RUjUplv8OZZSK5OvCrsyCwkmsg2yKxfHaRObmPqpu65x8lFk2jKBDK30LBTk2StP96kJI1VnIe3fxGXE6_1XKZTCJH9o_4vYvmA3wTHxlu8KWljLk10ttEqy736mEq9ex8TqnJVHebwRZ33UQTFZClqhQrIcLUrar5PXwlFMtvhgI1-Du5tVtKr1KECAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mc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GCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD-urQp96AuB916E-Te8RmgK90YXOfxpQ9UFVrx1h5G83WkRUIlKdESHrUjduIESxCRdkRY2ntf__S09h5_4l7f3rT0jpHXw-_8dUrAbn43jMiQmB2LXzLoyIWaLagT18F_wbUAmRMU1m1WEJE66ngt8mx407-SRKz6rKaPUCD2z-wIeSOcaXXY7KbRVUtbPS4GhSTo3fCRHPGpXS9ftpm-v7z3JFkXFsN7jcHBQDn2YqE7eFoPVqmoQtJZXXzAsWMeqSilE2wmsqn8Ty0ykZnqcfjuRNXoTC9CpuEhZYirAwmdBN87Cb7ZrhR2s8flm-uIqdEhk4mWeNMEyWsm5RLA&s=Z6CxeJLnOZwaTa03snFHIa5t_P4YgzYPHn-dDS_WrLYTdPGuOvUWTVDUo7tBnq5f60zhKxGF9Sz04y82l9eX6fkQwOJtWOzzC8Evb5OAB-EKpzwRuBRcvqjDxJ0uadIiWM0DCX5gLJjwF8Ic_kC4lt5GhlORbQzdmlJjM6QOAbdOguYrM5IVsWEv3Tqt3veu6L21AixO2PZ3XcEPV850ZB7rURXkW2RikjXnwCZ38nXq7LmCD5UNuL6rl2-qTB4I3EMU3Of1AtdZbypCfn07ZJIsRRcMI2PYyWSm19HXYnqvfpmw4dz-oNFNcGQor_Bt2cwSyiy4rS56C9Zbu6-A-A&h=OVkvRrGiU4cD1cYtNW94mUFDt6WcwLx5QdMxVkMH4PY + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: EBFF4C6D893E4F4689123ACE9BB4F459 Ref B: MAA201060513039 Ref C: 2024-05-27T02:38:57Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523743393542866&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm-rUyPQv0z_LgvMVxRmSGe7k2sSDcjhZtJtacrGF0aA0mXhldjASVDsIKbducmYozS8YVn2yXvxW_2yo82m2q934keEf1UEKaSADUrozDPX5msTyt18UcXAPp7vPi8MXbYjFOyyuc1uzgXltAbdS5P2ki32RUjUplv8OZZSK5OvCrsyCwkmsg2yKxfHaRObmP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TVDUo7tBnq5f60zhKxGF9Sz04y82l9eX6fkQwOJtWOzzC8Evb5OAB-EKpzwRuBRcvqjDxJ0uadIiWM0DCX5gLJjwF8Ic_kC4lt5GhlORbQzdmlJjM6QOAbdOguYrM5IVsWEv3Tqt3veu6L21AixO2PZ3XcEPV850ZB7rURXkW2RikjXnwCZ38nXq7LmCD5UNuL6rl2-qTB4I3EMU3Of1AtdZbypCfn07ZJIsRRcMI2PYyWSm19HXYnqvfpmw4dz-oNFNcGQor_Bt2cwSyiy4rS56C9Zbu6-A-A&h=OVkvRrGiU4cD1cYtNW94mUFDt6WcwLx5QdMxVkMH4PY + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123","name":"f080b9985027482081bce6441ddc2123","status":"NotStarted"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '322' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:39:00 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523743411265435&c=MIIIFjCCBv6gAwIBAgITfATTHy5IGyiL_HqW-wAABNMfLjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwNTA5MDEwODU1WhcNMjUwNTA0MDEwODU1WjCBjDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDV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BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEALr7D041At2PpKJ3UgACMJ0qkh79M0nPPT0iTGQMpYU-AzL0Gz57s3tKO9I8G39TCHjbERLEeik9dSBOplVVB4sChvyOlrYJ0Swf5c9lzcbN-y4Cakbn-RkUEikfrHOu-N2wsRDyskW3bUkkB8emJsJRHGxbELhwG63W2GX85jgO5inCOznx9Ctkbn_OZCeQDpFG47tikBnPtT0-CBRKrplVAs9bWJYcOqxTrEKUNzGjR-hK1efFBFO_Tnd-RI85JV3q9MfULQ45lfrX9vLx-sy05QgcoT67ROnoDDClesqHjyNLAWaatl9CMMW3fRIb44P9cn4FyLvG1Pk_-7kmgIA&s=ja2Bs5wGb4y8EMjIx3p-a3jB5LtPLfaKHqu5KjY8H6K1JLrToXmPq0Jr0WP1MedbqaiEeoHKc2gq2bF-Ie-AiIbSiPcssm0-oH98frcYEFcVJ80Wqh6A8NMcQ8pjISlbV4bM2pWaizefyWtOVx9gSiezAdBpYBUHlRL_APPNgk557HP3EN3AZcv5EOfCk5OspnddvakunZac14fZbgt24F04kkm4Fly2k3gr9LfQEoWVQHWp-fAJDvMfzXp0zPDY2s37yVJGlngqPaWPRnBSjGC1JJihqoyd2Dym4-w52lK_BbIlSFRo-9L-NX125XED_WcwQbHjq5OB47FqVnt6rA&h=da4jXrijCPVW8pCbXOEsGzttoq6jos2fqinRs-G3r9s + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: F3E7B92CA96140D48C46047DA384BE46 Ref B: MAA201060513039 Ref C: 2024-05-27T02:38:59Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523743411265435&c=MIIIFjCCBv6gAwIBAgITfATTHy5IGyiL_HqW-wAABNMfLjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwNTA5MDEwODU1WhcNMjUwNTA0MDEwODU1WjCBjDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv6N2D0SQWFnZl5dGOishxbeap4PzkFQa0KK8pNkTVvVyspMK2uAP9x29gCYAbOd3cJIEBPrw6wvQ_zoXUApIL1cQAzDsLf8D7UQas7OMzEZaDhoi0VgnDjoWYw8VldCCxbxjLO2H0xRBcYbw-QGXdnQL8cOeCZrquoO8LPHuC80FkYtYWHVUwQHq_utxmgbnRr28ZjjJbuqKSxVL2gAwOfAQ_Yh_NdvHtjaCVdVaua60gY4jGRgHhqo1H8vTWYXde0pnOfIDLRaQ3pQIjfKbTg8QGycEfjqJ0-uuCo2PhgEHD1FYctcHPzR_nj-dlyUfATIfMPEXICrzOYkNylc8TQIDAQABo4IEtjCCBLIwJwYJKw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AdBpYBUHlRL_APPNgk557HP3EN3AZcv5EOfCk5OspnddvakunZac14fZbgt24F04kkm4Fly2k3gr9LfQEoWVQHWp-fAJDvMfzXp0zPDY2s37yVJGlngqPaWPRnBSjGC1JJihqoyd2Dym4-w52lK_BbIlSFRo-9L-NX125XED_WcwQbHjq5OB47FqVnt6rA&h=da4jXrijCPVW8pCbXOEsGzttoq6jos2fqinRs-G3r9s + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123","name":"f080b9985027482081bce6441ddc2123","status":"NotStarted"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '322' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:39:32 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523743724851999&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm-rUyPQv0z_LgvMVxRmSGe7k2sSDcjhZtJtacrGF0aA0mXhldjASVD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ty0ykZnqcfjuRNXoTC9CpuEhZYirAwmdBN87Cb7ZrhR2s8flm-uIqdEhk4mWeNMEyWsm5RLA&s=kj-jpXvZQcj419uIR2q9_TsCVaSzoCuCsbkrLAfT2PJyw2ypQE3F2Fe3lBc2haCvOy99JpQdtfQpClcxrD-8tK95h_9ecVEsRGCWHwokl9Iw6MJieM_o5n2KyGQvqbube1pLPZU6Cm3TVs0Tmfqz_nYfnOhZSDEk64Vi1dZZeJT2SigaNuRhAd1tVeXukxcK1Y9EKAPMCer8wHsVBakoE0xUxzddgN2qugVy1Vg_8Y56IAw9xq0Fo1hZps8II5uCSVysj9PFRbyU1KoA4d1sLx9QLJB8_baO_TfWcMfRJaRVSjDi7m-bH2VLTtT0WL9nvmRX-DOJvWV5K55OUbFv8g&h=LcgF3vSw84W2hcP27Y5X8GSL1QPxer-qNqNQpgBoCfI + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 9BC0B318E4BB464B8FE6FD35EE66BD23 Ref B: MAA201060513039 Ref C: 2024-05-27T02:39:31Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523743724851999&c=MIIHpTCCBo2gAwIBAgITO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BgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAD-urQp96AuB916E-Te8RmgK90YXOfxpQ9UFVrx1h5G83WkRUIlKdESHrUjduIESxCRdkRY2ntf__S09h5_4l7f3rT0jpHXw-_8dUrAbn43jMiQmB2LXzLoyIWaLagT18F_wbUAmRMU1m1WEJE66ngt8mx407-SRKz6rKaPUCD2z-wIeSOcaXXY7KbRVUtbPS4GhSTo3fCRHPGpXS9ftpm-v7z3JFkXFsN7jcHBQDn2YqE7eFoPVqmoQtJZXXzAsWMeqSilE2wmsqn8Ty0ykZnqcfjuRNXoTC9CpuEhZYirAwmdBN87Cb7ZrhR2s8flm-uIqdEhk4mWeNMEyWsm5RLA&s=kj-jpXvZQcj419uIR2q9_TsCVaSzoCuCsbkrLAfT2PJyw2ypQE3F2Fe3lBc2haCvOy99JpQdtfQpClcxrD-8tK95h_9ecVEsRGCWHwokl9Iw6MJieM_o5n2KyGQvqbube1pLPZU6Cm3TVs0Tmfqz_nYfnOhZSDEk64Vi1dZZeJT2SigaNuRhAd1tVeXukxcK1Y9EKAPMCer8wHsVBakoE0xUxzddgN2qugVy1Vg_8Y56IAw9xq0Fo1hZps8II5uCSVysj9PFRbyU1KoA4d1sLx9QLJB8_baO_TfWcMfRJaRVSjDi7m-bH2VLTtT0WL9nvmRX-DOJvWV5K55OUbFv8g&h=LcgF3vSw84W2hcP27Y5X8GSL1QPxer-qNqNQpgBoCfI + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123","name":"f080b9985027482081bce6441ddc2123","status":"InProgress","startTime":"2024-05-27T02:39:43.1513838+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '370' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:40:03 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523744038536784&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm-rUyPQv0z_LgvMVxRmSGe7k2sSDcjhZtJtacrGF0aA0mXhldjASVDsIKbducmYozS8YVn2yXvxW_2yo82m2q934keEf1UEKaSADUrozDPX5msTyt18UcXAPp7vPi8MXbYjFOyyuc1uzgXltAbdS5P2ki32RUjUplv8OZZSK5OvCrsyCwkmsg2yKxfHaRObmPqpu65x8lFk2jKBDK30LBTk2StP96kJI1VnIe3fxGXE6_1XKZTCJH9o_4vYvmA3wTHxlu8KWljLk10ttEqy736mEq9ex8TqnJVHebwRZ33UQTFZClqhQrIcLUrar5PXwlFMtvhgI1-Du5tVtKr1KECAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQ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NRYwo7_dxc6JiTuhhxmxAJndGW00lfFaI + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: AF1469570993431A8EA133171FA360CC Ref B: MAA201060513039 Ref C: 2024-05-27T02:40:02Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123?api-version=2024-03-01&t=638523744038536784&c=MIIHpTCCBo2gAwIBAgITOgMPIyvO-SSNo3JCxQAEAw8jKzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNTE3MDc0MzI1WhcNMjUwNTEyMDc0MzI1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm-rUyPQv0z_LgvMVxRmSGe7k2sSDcjhZtJtacrGF0aA0mXhldjASVDsIKbducmYozS8YVn2yXvxW_2yo82m2q934keEf1UEKaSADUrozDPX5msTyt18UcXAPp7vPi8MXbYjF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RLA&s=ZiuLRAD2OraKYl-qCIe3M75_SsLjAOt4DfbnkTG441EMxVP7AmBVDWbM_ol2n-2iiXeihwwimAdZDyPEWk1qA4skb_5I_FXBe69iHSnQFkCvDndgnpIilq3AigFfG8UwVEUvqC-1LO7Bzn1rUtlpWNRf3WVoz3Wdm9Mko11GugygbNdH-97UyNQ0UkVX0BQS5CfVmvob0b4MZOIcMr2ML9jI9TH89RjIp9TjgGRM30_0VG4AW-hfwfZWLbQT5vq_ofTHDDv2FsRtZG4ABInTqKs8fuF4LopiGf4BF0QNrVgsk9F98CkVexGo2VYdgk0QNp_LB8slPWRZUXnA1c_Sgg&h=2g5JCKd3q7NRYwo7_dxc6JiTuhhxmxAJndGW00lfFaI + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/f080b9985027482081bce6441ddc2123","name":"f080b9985027482081bce6441ddc2123","status":"Succeeded","startTime":"2024-05-27T02:39:43.1513838+00:00","endTime":"2024-05-27T02:40:12.3370749+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '415' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:40:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 8FA79EBC22E54DCE94CC54B7F25F45F3 Ref B: MAA201060513039 Ref C: 2024-05-27T02:40:34Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_definitions.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_definitions.yaml new file mode 100644 index 00000000000..0d048f10498 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_definitions.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition list + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions?api-version=2024-03-01 + response: + body: + string: '{"value":[{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"OpenAPI"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005","name":"clitest000005","systemData":{"createdAt":"2024-05-27T02:28:14.9630355Z","lastModifiedAt":"2024-05-27T02:28:14.9630348Z"}},{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"OpenAPI"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000006","name":"clitest000006","systemData":{"createdAt":"2024-05-27T02:28:18.2274623Z","lastModifiedAt":"2024-05-27T02:28:18.2274617Z"}}]}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '941' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:28:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: AC3EC531705B4BF1BD0EB65B8C763A8C Ref B: MAA201060514035 Ref C: 2024-05-27T02:28:19Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_deployments.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_deployments.yaml new file mode 100644 index 00000000000..9556947c6b5 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_deployments.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api deployment list + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments?api-version=2024-03-01 + response: + body: + string: '{"value":[{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"test + deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/clitest000007","name":"clitest000007","systemData":{"createdAt":"2024-05-27T02:28:55.3507455Z","lastModifiedAt":"2024-05-27T02:28:55.3507448Z"}},{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"test + deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/clitest000008","name":"clitest000008","systemData":{"createdAt":"2024-05-27T02:28:58.3098839Z","lastModifiedAt":"2024-05-27T02:28:58.3098831Z"}}]}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '1413' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:29:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 4CA7CAA62C324836A8E7B25E38406D69 Ref B: MAA201060513023 Ref C: 2024-05-27T02:28:59Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_versions.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_versions.yaml new file mode 100644 index 00000000000..c832feda782 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_api_versions.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version list + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions?api-version=2024-03-01 + response: + body: + string: '{"value":[{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"v1.0.0","lifecycleStage":"production"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004","name":"clitest000004","systemData":{"createdAt":"2024-05-27T03:00:27.763325Z","lastModifiedAt":"2024-05-27T03:00:27.7633241Z"}},{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"v1.0.0","lifecycleStage":"production"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000005","name":"clitest000005","systemData":{"createdAt":"2024-05-27T03:00:30.3640908Z","lastModifiedAt":"2024-05-27T03:00:30.3640899Z"}}]}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '922' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:00:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 6840B2A782FA4AC9B46AFE86192D8161 Ref B: MAA201060516011 Ref C: 2024-05-27T03:00:32Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_apis.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_apis.yaml new file mode 100644 index 00000000000..85e1c62ac77 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_apis.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api list + Connection: + - keep-alive + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis?api-version=2024-03-01 + response: + body: + string: '{"value":[{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:53:32.9616045Z","lastModifiedAt":"2024-05-24T07:53:32.9616036Z"}},{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004","name":"clitest000004","systemData":{"createdAt":"2024-05-24T07:53:36.1592684Z","lastModifiedAt":"2024-05-24T07:53:36.1592675Z"}}]}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '957' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:53:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 8FFA15047250441DA2ADC16D6DB8EA70 Ref B: MAA201060516037 Ref C: 2024-05-24T07:53:37Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_environments.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_environments.yaml new file mode 100644 index 00000000000..261531c2f47 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_environments.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic environment list + Connection: + - keep-alive + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments?api-version=2024-03-01 + response: + body: + string: '{"value":[{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"test + environment","kind":"testing","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:15:28.7819817Z"}},{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"test + environment","kind":"testing","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000004","name":"clitest000004","systemData":{"createdAt":"2024-05-24T07:15:31.1386144Z"}}]}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '833' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:15:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 3BEE706C11374E25AF7FF661A3909BF8 Ref B: MAA201060515011 Ref C: 2024-05-24T07:15:32Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_metadata.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_metadata.yaml new file mode 100644 index 00000000000..249a005b5ce --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_metadata.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata list + Connection: + - keep-alive + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas?api-version=2024-03-01 + response: + body: + string: '{"value":[{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false},{"entity":"environment","required":true,"deprecated":false},{"entity":"deployment","required":true,"deprecated":false}],"schema":"{\"type\":\"boolean\", + \"title\":\"Public Facing\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:00:49.7849351Z","lastModifiedAt":"2024-05-24T07:00:49.7849345Z"}},{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false},{"entity":"environment","required":true,"deprecated":false},{"entity":"deployment","required":true,"deprecated":false}],"schema":"{\"type\":\"boolean\", + \"title\":\"Public Facing\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000004","name":"clitest000004","systemData":{"createdAt":"2024-05-24T07:00:52.7205697Z","lastModifiedAt":"2024-05-24T07:00:52.7205691Z"}}]}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '1247' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 33F9E7829B23493D80658155D0BE7862 Ref B: MAA201060513047 Ref C: 2024-05-24T07:00:53Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_services_in_resource_group.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_services_in_resource_group.yaml new file mode 100644 index 00000000000..58a656e9497 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_list_services_in_resource_group.yaml @@ -0,0 +1,52 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic service list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services?api-version=2024-03-01 + response: + body: + string: '{"value":[{"type":"Microsoft.ApiCenter/services","location":"eastus","sku":{"name":"Free"},"properties":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002","name":"clitest000002","tags":{},"systemData":{"createdAt":"2024-05-24T05:46:35.1707314Z","lastModifiedAt":"2024-05-24T05:46:35.1707238Z"}}]}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '387' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 05:46:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: E1D966FF952146F89AF65867BA451F83 Ref B: MAA201060514045 Ref C: 2024-05-24T05:46:38Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_json_spec.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_json_spec.yaml new file mode 100644 index 00000000000..f024887f547 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_json_spec.yaml @@ -0,0 +1,808 @@ +interactions: +- request: + body: '{"properties": {"contacts": [{"email": "apiteam@swagger.io"}], "description": + "This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You + can find out more about\nSwagger at [http://swagger.io](http://swagger.io). + In the third iteration of the pet store, we''ve switched to the design first + approach!\nYou can now help us improve the API whether it''s by making changes + to the definition itself or to the code.\nThat way, with time, we can improve + the API in general, and expose some of the new features in OAS3.\n\nSome useful + links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- + [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)", + "kind": "rest", "license": {"name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html"}, + "summary": "This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You + can find out more about\nSwagger at [http://swagger.io](http://swagger.io). + In the third iteration of the pet store, we''ve", "title": "Swagger Petstore + - OpenAPI 3.0"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '1144' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger + Petstore - OpenAPI 3.0","summary":"This is a sample Pet Store Server based + on the OpenAPI 3.0 specification. You can find out more about\nSwagger at + [http://swagger.io](http://swagger.io). In the third iteration of the pet + store, we''ve","description":"This is a sample Pet Store Server based on the + OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). + In the third iteration of the pet store, we''ve switched to the design first + approach!\nYou can now help us improve the API whether it''s by making changes + to the definition itself or to the code.\nThat way, with time, we can improve + the API in general, and expose some of the new features in OAS3.\n\nSome useful + links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- + [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","kind":"rest","license":{"name":"Apache + 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30","name":"swaggerpetstore-openapi30","systemData":{"createdAt":"2024-05-27T03:12:03.8097383Z","lastModifiedAt":"2024-05-27T03:12:03.8097376Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '1561' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:03 GMT + etag: + - 760061b8-0000-0100-0000-6653fa030000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: D4EDF495BE664DAEAFC0A651C08EFA0F Ref B: MAA201060514037 Ref C: 2024-05-27T03:12:02Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"lifecycleStage": "design", "title": "1-0-19"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '63' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-19","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19","name":"1-0-19","systemData":{"createdAt":"2024-05-27T03:12:06.5052936Z","lastModifiedAt":"2024-05-27T03:12:06.5052929Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '449' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:05 GMT + etag: + - 9b0175f7-0000-0100-0000-6653fa060000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 80E55CA3199740CB90CF6035F4181080 Ref B: MAA201060514017 Ref C: 2024-05-27T03:12:05Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"description": "This is a sample Pet Store Server based + on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). + In the third iteration of the pet store, we''ve switched to the design first + approach!\nYou can now help us improve the API whether it''s by making changes + to the definition itself or to the code.\nThat way, with time, we can improve + the API in general, and expose some of the new features in OAS3.\n\nSome useful + links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- + [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)", + "title": "openapi"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '749' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"openapi","description":"This + is a sample Pet Store Server based on the OpenAPI 3.0 specification. You + can find out more about\nSwagger at [http://swagger.io](http://swagger.io). + In the third iteration of the pet store, we''ve switched to the design first + approach!\nYou can now help us improve the API whether it''s by making changes + to the definition itself or to the code.\nThat way, with time, we can improve + the API in general, and expose some of the new features in OAS3.\n\nSome useful + links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- + [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-05-27T03:12:09.048017Z","lastModifiedAt":"2024-05-27T03:12:09.0480159Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '1167' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:09 GMT + etag: + - 520007d6-0000-0100-0000-6653fa090000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: A15D1F7945714710B12C11B65AB9E986 Ref B: MAA201060515039 Ref C: 2024-05-27T03:12:07Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"format": "inline", "specification": {"name": "openapi", "version": "3-0-2"}, + "value": "{\n \"openapi\": \"3.0.2\",\n \"info\": {\n \"title\": + \"Swagger Petstore - OpenAPI 3.0\",\n \"description\": \"This is a sample + Pet Store Server based on the OpenAPI 3.0 specification. You can find out more + about\\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration + of the pet store, we''ve switched to the design first approach!\\nYou can now + help us improve the API whether it''s by making changes to the definition itself + or to the code.\\nThat way, with time, we can improve the API in general, and + expose some of the new features in OAS3.\\n\\nSome useful links:\\n- [The Pet + Store repository](https://github.com/swagger-api/swagger-petstore)\\n- [The + source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\",\n \"termsOfService\": + \"http://swagger.io/terms/\",\n \"contact\": {\n \"email\": + \"apiteam@swagger.io\"\n },\n \"license\": {\n \"name\": + \"Apache 2.0\",\n \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n },\n \"version\": + \"1.0.19\"\n },\n \"externalDocs\": {\n \"description\": \"Find + out more about Swagger\",\n \"url\": \"http://swagger.io\"\n },\n \"servers\": + [\n {\n \"url\": \"/api/v3\"\n }\n ],\n \"tags\": + [\n {\n \"name\": \"pet\",\n \"description\": \"Everything + about your Pets\",\n \"externalDocs\": {\n \"description\": + \"Find out more\",\n \"url\": \"http://swagger.io\"\n }\n },\n {\n \"name\": + \"store\",\n \"description\": \"Access to Petstore orders\",\n \"externalDocs\": + {\n \"description\": \"Find out more about our store\",\n \"url\": + \"http://swagger.io\"\n }\n },\n {\n \"name\": + \"user\",\n \"description\": \"Operations about user\"\n }\n ],\n \"paths\": + {\n \"/pet\": {\n \"put\": {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"Update an existing pet\",\n \"description\": \"Update an existing + pet by Id\",\n \"operationId\": \"updatePet\",\n \"requestBody\": + {\n \"description\": \"Update an existent pet in the store\",\n \"content\": + {\n \"application/json\": {\n \"schema\": + {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n },\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n },\n \"application/x-www-form-urlencoded\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n },\n \"required\": + true\n },\n \"responses\": {\n \"200\": + {\n \"description\": \"Successful operation\",\n \"content\": + {\n \"application/xml\": {\n \"schema\": + {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n }\n },\n \"400\": + {\n \"description\": \"Invalid ID supplied\"\n },\n \"404\": + {\n \"description\": \"Pet not found\"\n },\n \"405\": + {\n \"description\": \"Validation exception\"\n }\n },\n \"security\": + [\n {\n \"petstore_auth\": [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n },\n \"post\": + {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"Add a new pet to the store\",\n \"description\": \"Add a new + pet to the store\",\n \"operationId\": \"addPet\",\n \"requestBody\": + {\n \"description\": \"Create a new pet in the store\",\n \"content\": + {\n \"application/json\": {\n \"schema\": + {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n },\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n },\n \"application/x-www-form-urlencoded\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n },\n \"required\": + true\n },\n \"responses\": {\n \"200\": + {\n \"description\": \"Successful operation\",\n \"content\": + {\n \"application/xml\": {\n \"schema\": + {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n }\n },\n \"405\": + {\n \"description\": \"Invalid input\"\n }\n },\n \"security\": + [\n {\n \"petstore_auth\": [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n }\n },\n \"/pet/findByStatus\": + {\n \"get\": {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"Finds Pets by status\",\n \"description\": \"Multiple status + values can be provided with comma separated strings\",\n \"operationId\": + \"findPetsByStatus\",\n \"parameters\": [\n {\n \"name\": + \"status\",\n \"in\": \"query\",\n \"description\": + \"Status values that need to be considered for filter\",\n \"required\": + false,\n \"explode\": true,\n \"schema\": + {\n \"type\": \"string\",\n \"default\": + \"available\",\n \"enum\": [\n \"available\",\n \"pending\",\n \"sold\"\n ]\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/xml\": + {\n \"schema\": {\n \"type\": + \"array\",\n \"items\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"type\": + \"array\",\n \"items\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n }\n }\n },\n \"400\": + {\n \"description\": \"Invalid status value\"\n }\n },\n \"security\": + [\n {\n \"petstore_auth\": [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n }\n },\n \"/pet/findByTags\": + {\n \"get\": {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"Finds Pets by tags\",\n \"description\": \"Multiple tags can + be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n \"operationId\": + \"findPetsByTags\",\n \"parameters\": [\n {\n \"name\": + \"tags\",\n \"in\": \"query\",\n \"description\": + \"Tags to filter by\",\n \"required\": false,\n \"explode\": + true,\n \"schema\": {\n \"type\": + \"array\",\n \"items\": {\n \"type\": + \"string\"\n }\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/xml\": + {\n \"schema\": {\n \"type\": + \"array\",\n \"items\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"type\": + \"array\",\n \"items\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n }\n }\n },\n \"400\": + {\n \"description\": \"Invalid tag value\"\n }\n },\n \"security\": + [\n {\n \"petstore_auth\": [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n }\n },\n \"/pet/{petId}\": + {\n \"get\": {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"Find pet by ID\",\n \"description\": \"Returns a single pet\",\n \"operationId\": + \"getPetById\",\n \"parameters\": [\n {\n \"name\": + \"petId\",\n \"in\": \"path\",\n \"description\": + \"ID of pet to return\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n }\n },\n \"400\": + {\n \"description\": \"Invalid ID supplied\"\n },\n \"404\": + {\n \"description\": \"Pet not found\"\n }\n },\n \"security\": + [\n {\n \"api_key\": []\n },\n {\n \"petstore_auth\": + [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n },\n \"post\": + {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"Updates a pet in the store with form data\",\n \"description\": + \"\",\n \"operationId\": \"updatePetWithForm\",\n \"parameters\": + [\n {\n \"name\": \"petId\",\n \"in\": + \"path\",\n \"description\": \"ID of pet that needs to + be updated\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n }\n },\n {\n \"name\": + \"name\",\n \"in\": \"query\",\n \"description\": + \"Name of pet that needs to be updated\",\n \"schema\": + {\n \"type\": \"string\"\n }\n },\n {\n \"name\": + \"status\",\n \"in\": \"query\",\n \"description\": + \"Status of pet that needs to be updated\",\n \"schema\": + {\n \"type\": \"string\"\n }\n }\n ],\n \"responses\": + {\n \"405\": {\n \"description\": + \"Invalid input\"\n }\n },\n \"security\": + [\n {\n \"petstore_auth\": [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n },\n \"delete\": + {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"Deletes a pet\",\n \"description\": \"\",\n \"operationId\": + \"deletePet\",\n \"parameters\": [\n {\n \"name\": + \"api_key\",\n \"in\": \"header\",\n \"description\": + \"\",\n \"required\": false,\n \"schema\": + {\n \"type\": \"string\"\n }\n },\n {\n \"name\": + \"petId\",\n \"in\": \"path\",\n \"description\": + \"Pet id to delete\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n }\n }\n ],\n \"responses\": + {\n \"400\": {\n \"description\": + \"Invalid pet value\"\n }\n },\n \"security\": + [\n {\n \"petstore_auth\": [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n }\n },\n \"/pet/{petId}/uploadImage\": + {\n \"post\": {\n \"tags\": [\n \"pet\"\n ],\n \"summary\": + \"uploads an image\",\n \"description\": \"\",\n \"operationId\": + \"uploadFile\",\n \"parameters\": [\n {\n \"name\": + \"petId\",\n \"in\": \"path\",\n \"description\": + \"ID of pet to update\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n }\n },\n {\n \"name\": + \"additionalMetadata\",\n \"in\": \"query\",\n \"description\": + \"Additional Metadata\",\n \"required\": false,\n \"schema\": + {\n \"type\": \"string\"\n }\n }\n ],\n \"requestBody\": + {\n \"content\": {\n \"application/octet-stream\": + {\n \"schema\": {\n \"type\": + \"string\",\n \"format\": \"binary\"\n }\n }\n }\n },\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/ApiResponse\"\n }\n }\n }\n }\n },\n \"security\": + [\n {\n \"petstore_auth\": [\n \"write:pets\",\n \"read:pets\"\n ]\n }\n ]\n }\n },\n \"/store/inventory\": + {\n \"get\": {\n \"tags\": [\n \"store\"\n ],\n \"summary\": + \"Returns pet inventories by status\",\n \"description\": \"Returns + a map of status codes to quantities\",\n \"operationId\": \"getInventory\",\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"type\": + \"object\",\n \"additionalProperties\": {\n \"type\": + \"integer\",\n \"format\": \"int32\"\n }\n }\n }\n }\n }\n },\n \"security\": + [\n {\n \"api_key\": []\n }\n ]\n }\n },\n \"/store/order\": + {\n \"post\": {\n \"tags\": [\n \"store\"\n ],\n \"summary\": + \"Place an order for a pet\",\n \"description\": \"Place a new + order in the store\",\n \"operationId\": \"placeOrder\",\n \"requestBody\": + {\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Order\"\n }\n },\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Order\"\n }\n },\n \"application/x-www-form-urlencoded\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Order\"\n }\n }\n }\n },\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Order\"\n }\n }\n }\n },\n \"405\": + {\n \"description\": \"Invalid input\"\n }\n }\n }\n },\n \"/store/order/{orderId}\": + {\n \"get\": {\n \"tags\": [\n \"store\"\n ],\n \"summary\": + \"Find purchase order by ID\",\n \"description\": \"For valid + response try integer IDs with value <= 5 or > 10. Other values will generate + exceptions.\",\n \"operationId\": \"getOrderById\",\n \"parameters\": + [\n {\n \"name\": \"orderId\",\n \"in\": + \"path\",\n \"description\": \"ID of order that needs + to be fetched\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Order\"\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Order\"\n }\n }\n }\n },\n \"400\": + {\n \"description\": \"Invalid ID supplied\"\n },\n \"404\": + {\n \"description\": \"Order not found\"\n }\n }\n },\n \"delete\": + {\n \"tags\": [\n \"store\"\n ],\n \"summary\": + \"Delete purchase order by ID\",\n \"description\": \"For valid + response try integer IDs with value < 1000. Anything above 1000 or nonintegers + will generate API errors\",\n \"operationId\": \"deleteOrder\",\n \"parameters\": + [\n {\n \"name\": \"orderId\",\n \"in\": + \"path\",\n \"description\": \"ID of the order that needs + to be deleted\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n }\n }\n ],\n \"responses\": + {\n \"400\": {\n \"description\": + \"Invalid ID supplied\"\n },\n \"404\": + {\n \"description\": \"Order not found\"\n }\n }\n }\n },\n \"/user\": + {\n \"post\": {\n \"tags\": [\n \"user\"\n ],\n \"summary\": + \"Create user\",\n \"description\": \"This can only be done by + the logged in user.\",\n \"operationId\": \"createUser\",\n \"requestBody\": + {\n \"description\": \"Created user object\",\n \"content\": + {\n \"application/json\": {\n \"schema\": + {\n \"$ref\": \"#/components/schemas/User\"\n }\n },\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n },\n \"application/x-www-form-urlencoded\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n }\n }\n },\n \"responses\": + {\n \"default\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n },\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n }\n }\n }\n }\n }\n },\n \"/user/createWithList\": + {\n \"post\": {\n \"tags\": [\n \"user\"\n ],\n \"summary\": + \"Creates list of users with given input array\",\n \"description\": + \"Creates list of users with given input array\",\n \"operationId\": + \"createUsersWithListInput\",\n \"requestBody\": {\n \"content\": + {\n \"application/json\": {\n \"schema\": + {\n \"type\": \"array\",\n \"items\": + {\n \"$ref\": \"#/components/schemas/User\"\n }\n }\n }\n }\n },\n \"responses\": + {\n \"200\": {\n \"description\": + \"Successful operation\",\n \"content\": {\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n }\n }\n },\n \"default\": + {\n \"description\": \"successful operation\"\n }\n }\n }\n },\n \"/user/login\": + {\n \"get\": {\n \"tags\": [\n \"user\"\n ],\n \"summary\": + \"Logs user into the system\",\n \"description\": \"\",\n \"operationId\": + \"loginUser\",\n \"parameters\": [\n {\n \"name\": + \"username\",\n \"in\": \"query\",\n \"description\": + \"The user name for login\",\n \"required\": false,\n \"schema\": + {\n \"type\": \"string\"\n }\n },\n {\n \"name\": + \"password\",\n \"in\": \"query\",\n \"description\": + \"The password for login in clear text\",\n \"required\": + false,\n \"schema\": {\n \"type\": + \"string\"\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"headers\": {\n \"X-Rate-Limit\": + {\n \"description\": \"calls per hour allowed + by the user\",\n \"schema\": {\n \"type\": + \"integer\",\n \"format\": \"int32\"\n }\n },\n \"X-Expires-After\": + {\n \"description\": \"date in UTC when token + expires\",\n \"schema\": {\n \"type\": + \"string\",\n \"format\": \"date-time\"\n }\n }\n },\n \"content\": + {\n \"application/xml\": {\n \"schema\": + {\n \"type\": \"string\"\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"type\": + \"string\"\n }\n }\n }\n },\n \"400\": + {\n \"description\": \"Invalid username/password supplied\"\n }\n }\n }\n },\n \"/user/logout\": + {\n \"get\": {\n \"tags\": [\n \"user\"\n ],\n \"summary\": + \"Logs out current logged in user session\",\n \"description\": + \"\",\n \"operationId\": \"logoutUser\",\n \"parameters\": + [],\n \"responses\": {\n \"default\": {\n \"description\": + \"successful operation\"\n }\n }\n }\n },\n \"/user/{username}\": + {\n \"get\": {\n \"tags\": [\n \"user\"\n ],\n \"summary\": + \"Get user by user name\",\n \"description\": \"\",\n \"operationId\": + \"getUserByName\",\n \"parameters\": [\n {\n \"name\": + \"username\",\n \"in\": \"path\",\n \"description\": + \"The name that needs to be fetched. Use user1 for testing. \",\n \"required\": + true,\n \"schema\": {\n \"type\": + \"string\"\n }\n }\n ],\n \"responses\": + {\n \"200\": {\n \"description\": + \"successful operation\",\n \"content\": {\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n },\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n }\n }\n },\n \"400\": + {\n \"description\": \"Invalid username supplied\"\n },\n \"404\": + {\n \"description\": \"User not found\"\n }\n }\n },\n \"put\": + {\n \"tags\": [\n \"user\"\n ],\n \"summary\": + \"Update user\",\n \"description\": \"This can only be done by + the logged in user.\",\n \"operationId\": \"updateUser\",\n \"parameters\": + [\n {\n \"name\": \"username\",\n \"in\": + \"path\",\n \"description\": \"name that needs to be + updated\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"string\"\n }\n }\n ],\n \"requestBody\": + {\n \"description\": \"Update an existent user in the store\",\n \"content\": + {\n \"application/json\": {\n \"schema\": + {\n \"$ref\": \"#/components/schemas/User\"\n }\n },\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n },\n \"application/x-www-form-urlencoded\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/User\"\n }\n }\n }\n },\n \"responses\": + {\n \"default\": {\n \"description\": + \"successful operation\"\n }\n }\n },\n \"delete\": + {\n \"tags\": [\n \"user\"\n ],\n \"summary\": + \"Delete user\",\n \"description\": \"This can only be done by + the logged in user.\",\n \"operationId\": \"deleteUser\",\n \"parameters\": + [\n {\n \"name\": \"username\",\n \"in\": + \"path\",\n \"description\": \"The name that needs to + be deleted\",\n \"required\": true,\n \"schema\": + {\n \"type\": \"string\"\n }\n }\n ],\n \"responses\": + {\n \"400\": {\n \"description\": + \"Invalid username supplied\"\n },\n \"404\": + {\n \"description\": \"User not found\"\n }\n }\n }\n }\n },\n \"components\": + {\n \"schemas\": {\n \"Order\": {\n \"type\": + \"object\",\n \"properties\": {\n \"id\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\",\n \"example\": 10\n },\n \"petId\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\",\n \"example\": 198772\n },\n \"quantity\": + {\n \"type\": \"integer\",\n \"format\": + \"int32\",\n \"example\": 7\n },\n \"shipDate\": + {\n \"type\": \"string\",\n \"format\": + \"date-time\"\n },\n \"status\": {\n \"type\": + \"string\",\n \"description\": \"Order Status\",\n \"example\": + \"approved\",\n \"enum\": [\n \"placed\",\n \"approved\",\n \"delivered\"\n ]\n },\n \"complete\": + {\n \"type\": \"boolean\"\n }\n },\n \"xml\": + {\n \"name\": \"order\"\n }\n },\n \"Customer\": + {\n \"type\": \"object\",\n \"properties\": {\n \"id\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\",\n \"example\": 100000\n },\n \"username\": + {\n \"type\": \"string\",\n \"example\": + \"fehguy\"\n },\n \"address\": {\n \"type\": + \"array\",\n \"xml\": {\n \"name\": + \"addresses\",\n \"wrapped\": true\n },\n \"items\": + {\n \"$ref\": \"#/components/schemas/Address\"\n }\n }\n },\n \"xml\": + {\n \"name\": \"customer\"\n }\n },\n \"Address\": + {\n \"type\": \"object\",\n \"properties\": {\n \"street\": + {\n \"type\": \"string\",\n \"example\": + \"437 Lytton\"\n },\n \"city\": {\n \"type\": + \"string\",\n \"example\": \"Palo Alto\"\n },\n \"state\": + {\n \"type\": \"string\",\n \"example\": + \"CA\"\n },\n \"zip\": {\n \"type\": + \"string\",\n \"example\": \"94301\"\n }\n },\n \"xml\": + {\n \"name\": \"address\"\n }\n },\n \"Category\": + {\n \"type\": \"object\",\n \"properties\": {\n \"id\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\",\n \"example\": 1\n },\n \"name\": + {\n \"type\": \"string\",\n \"example\": + \"Dogs\"\n }\n },\n \"xml\": + {\n \"name\": \"category\"\n }\n },\n \"User\": + {\n \"type\": \"object\",\n \"properties\": {\n \"id\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\",\n \"example\": 10\n },\n \"username\": + {\n \"type\": \"string\",\n \"example\": + \"theUser\"\n },\n \"firstName\": {\n \"type\": + \"string\",\n \"example\": \"John\"\n },\n \"lastName\": + {\n \"type\": \"string\",\n \"example\": + \"James\"\n },\n \"email\": {\n \"type\": + \"string\",\n \"example\": \"john@email.com\"\n },\n \"password\": + {\n \"type\": \"string\",\n \"example\": + \"12345\"\n },\n \"phone\": {\n \"type\": + \"string\",\n \"example\": \"12345\"\n },\n \"userStatus\": + {\n \"type\": \"integer\",\n \"description\": + \"User Status\",\n \"format\": \"int32\",\n \"example\": + 1\n }\n },\n \"xml\": {\n \"name\": + \"user\"\n }\n },\n \"Tag\": {\n \"type\": + \"object\",\n \"properties\": {\n \"id\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\"\n },\n \"name\": {\n \"type\": + \"string\"\n }\n },\n \"xml\": + {\n \"name\": \"tag\"\n }\n },\n \"Pet\": + {\n \"required\": [\n \"name\",\n \"photoUrls\"\n ],\n \"type\": + \"object\",\n \"properties\": {\n \"id\": + {\n \"type\": \"integer\",\n \"format\": + \"int64\",\n \"example\": 10\n },\n \"name\": + {\n \"type\": \"string\",\n \"example\": + \"doggie\"\n },\n \"category\": {\n \"$ref\": + \"#/components/schemas/Category\"\n },\n \"photoUrls\": + {\n \"type\": \"array\",\n \"xml\": + {\n \"wrapped\": true\n },\n \"items\": + {\n \"type\": \"string\",\n \"xml\": + {\n \"name\": \"photoUrl\"\n }\n }\n },\n \"tags\": + {\n \"type\": \"array\",\n \"xml\": + {\n \"wrapped\": true\n },\n \"items\": + {\n \"$ref\": \"#/components/schemas/Tag\"\n }\n },\n \"status\": + {\n \"type\": \"string\",\n \"description\": + \"pet status in the store\",\n \"enum\": [\n \"available\",\n \"pending\",\n \"sold\"\n ]\n }\n },\n \"xml\": + {\n \"name\": \"pet\"\n }\n },\n \"ApiResponse\": + {\n \"type\": \"object\",\n \"properties\": {\n \"code\": + {\n \"type\": \"integer\",\n \"format\": + \"int32\"\n },\n \"type\": {\n \"type\": + \"string\"\n },\n \"message\": {\n \"type\": + \"string\"\n }\n },\n \"xml\": + {\n \"name\": \"##default\"\n }\n }\n },\n \"requestBodies\": + {\n \"Pet\": {\n \"description\": \"Pet object that + needs to be added to the store\",\n \"content\": {\n \"application/json\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n },\n \"application/xml\": + {\n \"schema\": {\n \"$ref\": + \"#/components/schemas/Pet\"\n }\n }\n }\n },\n \"UserArray\": + {\n \"description\": \"List of user object\",\n \"content\": + {\n \"application/json\": {\n \"schema\": + {\n \"type\": \"array\",\n \"items\": + {\n \"$ref\": \"#/components/schemas/User\"\n }\n }\n }\n }\n }\n },\n \"securitySchemes\": + {\n \"petstore_auth\": {\n \"type\": \"oauth2\",\n \"flows\": + {\n \"implicit\": {\n \"authorizationUrl\": + \"https://petstore3.swagger.io/oauth/authorize\",\n \"scopes\": + {\n \"write:pets\": \"modify pets in your account\",\n \"read:pets\": + \"read your pets\"\n }\n }\n }\n },\n \"api_key\": + {\n \"type\": \"apiKey\",\n \"name\": \"api_key\",\n \"in\": + \"header\"\n }\n }\n }\n}"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '47822' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi/importSpecification?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 27 May 2024 03:12:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: EDB1FB8FC01F4421B93C1FA54275791D Ref B: MAA201060516033 Ref C: 2024-05-27T03:12:10Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"test + environment","kind":"testing","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-27T03:12:01.301318Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '409' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:14 GMT + etag: + - 7100eb7f-0000-0100-0000-6653fa010000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: EF5A176A98D04AC4B026D895F1C790D6 Ref B: MAA201060514039 Ref C: 2024-05-27T03:12:13Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"definitionId": "/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi", + "description": "swaggerpetstoreopenapi30deployment", "environmentId": "/workspaces/default/environments/clitest000003", + "server": {"runtimeUri": ["/api/v3"]}, "title": "swaggerpetstoreopenapi30deployment"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '328' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"swaggerpetstoreopenapi30deployment","description":"swaggerpetstoreopenapi30deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","server":{"runtimeUri":["/api/v3"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/deployments/swaggerpetstoreopenapi30deployment","name":"swaggerpetstoreopenapi30deployment","systemData":{"createdAt":"2024-05-27T03:12:16.7056378Z","lastModifiedAt":"2024-05-27T03:12:16.7056368Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '811' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:16 GMT + etag: + - 3b010db8-0000-0100-0000-6653fa100000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: E52ACDE29CB34D9DBDA8F432F242BDB3 Ref B: MAA201060515009 Ref C: 2024-05-27T03:12:15Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_yml_spec.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_yml_spec.yaml new file mode 100644 index 00000000000..68b46b6a014 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_yml_spec.yaml @@ -0,0 +1,385 @@ +interactions: +- request: + body: '{"properties": {"description": "API Description", "kind": "rest", "license": + {"name": "MIT"}, "summary": "API Description", "title": "Swagger Petstore"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '153' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger + Petstore","summary":"API Description","description":"API Description","kind":"rest","license":{"name":"MIT"},"externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore","name":"swaggerpetstore","systemData":{"createdAt":"2024-05-27T03:12:35.3918391Z","lastModifiedAt":"2024-05-27T03:12:35.3918381Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '569' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:34 GMT + etag: + - 760038ba-0000-0100-0000-6653fa230000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 13CE1D42B3B14A7B800776917E4599B7 Ref B: MAA201060514017 Ref C: 2024-05-27T03:12:34Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"lifecycleStage": "design", "title": "1-0-0"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '62' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-0","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0","name":"1-0-0","systemData":{"createdAt":"2024-05-27T03:12:37.9827022Z","lastModifiedAt":"2024-05-27T03:12:37.9827016Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '436' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:37 GMT + etag: + - 9b0135fa-0000-0100-0000-6653fa250000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 20A9A3003363411D92220CD1301F7BD4 Ref B: MAA201060516023 Ref C: 2024-05-27T03:12:36Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"description": "API Description", "title": "openapi"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"openapi","description":"API + Description"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-05-27T03:12:40.7802176Z","lastModifiedAt":"2024-05-27T03:12:40.7802156Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:40 GMT + etag: + - 520007d7-0000-0100-0000-6653fa280000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 7CB199826255424A91223D927614582B Ref B: MAA201060513023 Ref C: 2024-05-27T03:12:39Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"format": "inline", "specification": {"name": "openapi", "version": "3-0-0"}, + "value": "openapi: \"3.0.0\"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n name: + MIT\nservers:\n - url: http://petstore.swagger.io/v1\npaths:\n /pets:\n get:\n summary: + List all pets\n operationId: listPets\n tags:\n - pets\n parameters:\n - + name: limit\n in: query\n description: How many items to return + at one time (max 100)\n required: false\n schema:\n type: + integer\n maximum: 100\n format: int32\n responses:\n ''200'':\n description: + A paged array of pets\n headers:\n x-next:\n description: + A link to the next page of responses\n schema:\n type: + string\n content:\n application/json: \n schema:\n $ref: + \"#/components/schemas/Pets\"\n default:\n description: unexpected + error\n content:\n application/json:\n schema:\n $ref: + \"#/components/schemas/Error\"\n post:\n summary: Create a pet\n operationId: + createPets\n tags:\n - pets\n requestBody:\n content:\n application/json:\n schema:\n $ref: + ''#/components/schemas/Pet''\n required: true\n responses:\n ''201'':\n description: + Null response\n default:\n description: unexpected error\n content:\n application/json:\n schema:\n $ref: + \"#/components/schemas/Error\"\n /pets/{petId}:\n get:\n summary: Info + for a specific pet\n operationId: showPetById\n tags:\n - pets\n parameters:\n - + name: petId\n in: path\n required: true\n description: + The id of the pet to retrieve\n schema:\n type: string\n responses:\n ''200'':\n description: + Expected response to a valid request\n content:\n application/json:\n schema:\n $ref: + \"#/components/schemas/Pet\"\n default:\n description: unexpected + error\n content:\n application/json:\n schema:\n $ref: + \"#/components/schemas/Error\"\ncomponents:\n schemas:\n Pet:\n type: + object\n required:\n - id\n - name\n properties:\n id:\n type: + integer\n format: int64\n name:\n type: string\n tag:\n type: + string\n Pets:\n type: array\n maxItems: 100\n items:\n $ref: + \"#/components/schemas/Pet\"\n Error:\n type: object\n required:\n - + code\n - message\n properties:\n code:\n type: integer\n format: + int32\n message:\n type: string\n"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '2996' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi/importSpecification?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 27 May 2024 03:12:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 1605FCCDC3394421AA2A3E48A0FDA236 Ref B: MAA201060513051 Ref C: 2024-05-27T03:12:42Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"test + environment","kind":"testing","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-27T03:12:32.7905852Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:45 GMT + etag: + - 71005781-0000-0100-0000-6653fa200000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: F62AF13F56994DF0B142B8FA810CBD7B Ref B: MAA201060513037 Ref C: 2024-05-27T03:12:44Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"definitionId": "/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi", + "description": "swaggerpetstoredeployment", "environmentId": "/workspaces/default/environments/clitest000003", + "server": {"runtimeUri": ["http://petstore.swagger.io/v1"]}, "title": "swaggerpetstoredeployment"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-location --environment-name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"swaggerpetstoredeployment","description":"swaggerpetstoredeployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi","server":{"runtimeUri":["http://petstore.swagger.io/v1"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/deployments/swaggerpetstoredeployment","name":"swaggerpetstoredeployment","systemData":{"createdAt":"2024-05-27T03:12:48.4053202Z","lastModifiedAt":"2024-05-27T03:12:48.4053195Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '776' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:12:47 GMT + etag: + - 3b0122bb-0000-0100-0000-6653fa300000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: A3E7895126534DA68DFE59A1F400DF2A Ref B: MAA201060516047 Ref C: 2024-05-27T03:12:47Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_definition_details.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_definition_details.yaml new file mode 100644 index 00000000000..4572a82afa1 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_definition_details.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition show + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"OpenAPI"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005","name":"clitest000005","systemData":{"createdAt":"2024-05-27T02:28:42.5739588Z","lastModifiedAt":"2024-05-27T02:28:42.5739582Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '464' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:28:45 GMT + etag: + - 52008a89-0000-0100-0000-6653efda0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 5290E7BA541841028E625B1771068F4D Ref B: MAA201060514023 Ref C: 2024-05-27T02:28:44Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_deployment_details.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_deployment_details.yaml new file mode 100644 index 00000000000..2a7f15235aa --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_deployment_details.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api deployment show + Connection: + - keep-alive + ParameterSetName: + - -g -s --deployment-id --api-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"test + deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/clitest000007","name":"clitest000007","systemData":{"createdAt":"2024-05-27T02:29:29.7184568Z","lastModifiedAt":"2024-05-27T02:29:29.7184561Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '700' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:29:32 GMT + etag: + - 3a014e08-0000-0100-0000-6653f0090000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 3B329D90A4FE47B4BE450FACC88D4F90 Ref B: MAA201060515049 Ref C: 2024-05-27T02:29:31Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_details.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_details.yaml new file mode 100644 index 00000000000..492bf3c570f --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_details.yaml @@ -0,0 +1,55 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api show + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:50:59.2973483Z","lastModifiedAt":"2024-05-24T07:50:59.297347Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '471' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:51:01 GMT + etag: + - 3000bb3e-0000-0100-0000-665046e30000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A6FD3676BDEC4F2B9A3ED0B0E3CBF706 Ref B: MAA201060515019 Ref C: 2024-05-24T07:51:00Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_version_details.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_version_details.yaml new file mode 100644 index 00000000000..214c2360eb7 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_api_version_details.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version show + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"v1.0.0","lifecycleStage":"production"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004","name":"clitest000004","systemData":{"createdAt":"2024-05-27T02:54:20.852647Z","lastModifiedAt":"2024-05-27T02:54:20.8526462Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '454' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:54:23 GMT + etag: + - 9a0118f9-0000-0100-0000-6653f5dc0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: AB993620B7DE4B92898400193D82FCDA Ref B: MAA201060513053 Ref C: 2024-05-27T02:54:22Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_environment_details.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_environment_details.yaml new file mode 100644 index 00000000000..6cac71c1684 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_environment_details.yaml @@ -0,0 +1,55 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic environment show + Connection: + - keep-alive + ParameterSetName: + - -g -s --environment-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"test + environment","kind":"testing","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:15:53.5318894Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:15:55 GMT + etag: + - 25008728-0000-0100-0000-66503ea90000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 7EA1E51170B846FC9A18742EDD07C9CE Ref B: MAA201060514025 Ref C: 2024-05-24T07:15:54Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_metadata_1.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_metadata_1.yaml new file mode 100644 index 00000000000..7e627d8ec5e --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_metadata_1.yaml @@ -0,0 +1,55 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata show + Connection: + - keep-alive + ParameterSetName: + - -g -s --name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false},{"entity":"environment","required":true,"deprecated":false},{"entity":"deployment","required":true,"deprecated":false}],"schema":"{\"type\":\"boolean\", + \"title\":\"Public Facing\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:01:10.8669929Z","lastModifiedAt":"2024-05-24T07:01:10.8669923Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '617' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:01:12 GMT + etag: + - 21009879-0000-0100-0000-66503b360000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 5096EB9D38EB48F1B5DF5BEC0FA80A1E Ref B: MAA201060513039 Ref C: 2024-05-24T07:01:12Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_metadata_2.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_metadata_2.yaml new file mode 100644 index 00000000000..f9d5adf2a0a --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_metadata_2.yaml @@ -0,0 +1,55 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --service-name --name + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false},{"entity":"environment","required":true,"deprecated":false},{"entity":"deployment","required":true,"deprecated":false}],"schema":"{\"type\":\"boolean\", + \"title\":\"Public Facing\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:01:29.5859028Z","lastModifiedAt":"2024-05-24T07:01:29.5859022Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '617' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:01:31 GMT + etag: + - 2100ff7b-0000-0100-0000-66503b490000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 2E71390A6D6643999A6F74C1110EE8D7 Ref B: MAA201060516023 Ref C: 2024-05-24T07:01:30Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_service_details.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_service_details.yaml new file mode 100644 index 00000000000..4183144f1ec --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_show_service_details.yaml @@ -0,0 +1,54 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic service show + Connection: + - keep-alive + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services","location":"eastus","sku":{"name":"Free"},"properties":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002","name":"clitest000002","tags":{},"systemData":{"createdAt":"2024-05-24T05:46:59.9366884Z","lastModifiedAt":"2024-05-24T05:46:59.9366822Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '375' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 05:47:03 GMT + etag: + - 5a00e173-0000-0100-0000-665029d40000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: A7677C4303534E8B83E2E85E66D49F39 Ref B: MAA201060514021 Ref C: 2024-05-24T05:47:02Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api.yaml new file mode 100644 index 00000000000..881bad0b242 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api update + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --summary + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:51:18.6147194Z","lastModifiedAt":"2024-05-24T07:51:18.6147186Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '472' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:51:20 GMT + etag: + - 3000a440-0000-0100-0000-665046f60000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: 50F49179F1A044E1A8609DB3F1A0AFAD Ref B: MAA201060516029 Ref C: 2024-05-24T07:51:19Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"contacts": [], "customProperties": {}, "externalDocumentation": + [], "kind": "rest", "summary": "Basic REST API service", "title": "Echo API"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api update + Connection: + - keep-alive + Content-Length: + - '159' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --summary + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","summary":"Basic REST API service","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003","name":"clitest000003","systemData":{"lastModifiedAt":"2024-05-24T07:51:23.5299336Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '464' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:51:22 GMT + etag: + - 30003a41-0000-0100-0000-665046fb0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 439D1BD187E44E0A9320715AEDE0E910 Ref B: MAA201060516029 Ref C: 2024-05-24T07:51:21Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_definition.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_definition.yaml new file mode 100644 index 00000000000..655d914bcce --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_definition.yaml @@ -0,0 +1,116 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition update + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --definition-id --title + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"OpenAPI"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005","name":"clitest000005","systemData":{"createdAt":"2024-05-27T02:29:10.3193874Z","lastModifiedAt":"2024-05-27T02:29:10.3193869Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '464' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:29:12 GMT + etag: + - 5200548a-0000-0100-0000-6653eff60000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 000048513A7C428DA51283DD22A3CD57 Ref B: MAA201060515045 Ref C: 2024-05-27T02:29:12Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"title": "OpenAPI"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition update + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --version-id --definition-id --title + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"OpenAPI"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005","name":"clitest000005","systemData":{"lastModifiedAt":"2024-05-27T02:29:14.4785203Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '421' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:29:13 GMT + etag: + - 52006e8a-0000-0100-0000-6653effa0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 1020F8776B2647FCB918511EE496C60C Ref B: MAA201060515045 Ref C: 2024-05-27T02:29:13Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_deployment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_deployment.yaml new file mode 100644 index 00000000000..46ed503171b --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_deployment.yaml @@ -0,0 +1,120 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api deployment update + Connection: + - keep-alive + ParameterSetName: + - -g -s --deployment-id --title --api-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"test + deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/clitest000007","name":"clitest000007","systemData":{"createdAt":"2024-05-27T02:30:00.610153Z","lastModifiedAt":"2024-05-27T02:30:00.610152Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '698' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:30:02 GMT + etag: + - 3a014b0a-0000-0100-0000-6653f0280000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: DF036F5225DD411987159E321217A149 Ref B: MAA201060514017 Ref C: 2024-05-27T02:30:02Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"customProperties": {}, "definitionId": "/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006", + "environmentId": "/workspaces/default/environments/clitest000003", "server": + {"runtimeUri": ["https://example.com"]}, "title": "Production deployment"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api deployment update + Connection: + - keep-alive + Content-Length: + - '299' + Content-Type: + - application/json + ParameterSetName: + - -g -s --deployment-id --title --api-id + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"Production + deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/clitest000004/versions/clitest000005/definitions/clitest000006","server":{"runtimeUri":["https://example.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000004/deployments/clitest000007","name":"clitest000007","systemData":{"lastModifiedAt":"2024-05-27T02:30:04.5605583Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '663' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 02:30:04 GMT + etag: + - 3a01bf0a-0000-0100-0000-6653f02c0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 69811FAB034F4DFDAFD55FA24BCF07B1 Ref B: MAA201060514017 Ref C: 2024-05-27T02:30:03Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_version.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_version.yaml new file mode 100644 index 00000000000..d8dea015472 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_api_version.yaml @@ -0,0 +1,116 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version update + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --version-id --title + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"v1.0.0","lifecycleStage":"production"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004","name":"clitest000004","systemData":{"createdAt":"2024-05-27T03:03:39.9080455Z","lastModifiedAt":"2024-05-27T03:03:39.9080449Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '455' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:03:42 GMT + etag: + - 9b015b65-0000-0100-0000-6653f80b0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 3740C255F3914865AA7E5884B3CB162C Ref B: MAA201060516045 Ref C: 2024-05-27T03:03:41Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"lifecycleStage": "production", "title": "2023-01-01"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version update + Connection: + - keep-alive + Content-Length: + - '71' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --version-id --title + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"2023-01-01","lifecycleStage":"production"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004","name":"clitest000004","systemData":{"lastModifiedAt":"2024-05-27T03:03:43.5737915Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '416' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 27 May 2024 03:03:43 GMT + etag: + - 9b019666-0000-0100-0000-6653f80f0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 740F8230A8DB442E9E165F4D933CDF8F Ref B: MAA201060516045 Ref C: 2024-05-27T03:03:43Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_custom_properties.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_custom_properties.yaml new file mode 100644 index 00000000000..499e136a44e --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_custom_properties.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api update + Connection: + - keep-alive + ParameterSetName: + - -g -s --api-id --custom-properties + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T08:02:43.2399409Z","lastModifiedAt":"2024-05-24T08:02:43.2399376Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '472' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 08:02:47 GMT + etag: + - 3000c880-0000-0100-0000-665049a30000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: FC259DC798B04227A8C768F3FA372719 Ref B: MAA201060515045 Ref C: 2024-05-24T08:02:47Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"contacts": [], "customProperties": {"clitest000004": true}, + "externalDocumentation": [], "kind": "rest", "title": "Echo API"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api update + Connection: + - keep-alive + Content-Length: + - '143' + Content-Type: + - application/json + ParameterSetName: + - -g -s --api-id --custom-properties + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Echo + API","kind":"rest","externalDocumentation":[],"contacts":[],"customProperties":{"clitest000004":true}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003","name":"clitest000003","systemData":{"lastModifiedAt":"2024-05-24T08:02:50.3480965Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '449' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 08:02:49 GMT + etag: + - 30007e81-0000-0100-0000-665049aa0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: 481188BFFD814CDE825FB67E93BB0A02 Ref B: MAA201060515045 Ref C: 2024-05-24T08:02:48Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_environment.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_environment.yaml new file mode 100644 index 00000000000..3f9d542ba28 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_environment.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic environment update + Connection: + - keep-alive + ParameterSetName: + - -g -s --environment-id --title + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"test + environment","kind":"testing","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:14:41.6084852Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:14:43 GMT + etag: + - 25006323-0000-0100-0000-66503e610000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: F0F6CD33BBFC48488683459940E7A62E Ref B: MAA201060514037 Ref C: 2024-05-24T07:14:42Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"customProperties": {}, "kind": "testing", "title": "Public + cloud"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic environment update + Connection: + - keep-alive + Content-Length: + - '84' + Content-Type: + - application/json + ParameterSetName: + - -g -s --environment-id --title + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/environments","properties":{"title":"Public + cloud","kind":"testing","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/environments/clitest000003","name":"clitest000003","systemData":{"lastModifiedAt":"2024-05-24T07:14:45.435246Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:14:44 GMT + etag: + - 25009623-0000-0100-0000-66503e650000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-msedge-ref: + - 'Ref A: BC00C49C2CD04B86ABEAAF22AB88100A Ref B: MAA201060514037 Ref C: 2024-05-24T07:14:44Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_metadata.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_metadata.yaml new file mode 100644 index 00000000000..b127181a765 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_metadata.yaml @@ -0,0 +1,117 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --service-name --name --schema + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false},{"entity":"environment","required":true,"deprecated":false},{"entity":"deployment","required":true,"deprecated":false}],"schema":"{\"type\":\"boolean\", + \"title\":\"Public Facing\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003","name":"clitest000003","systemData":{"createdAt":"2024-05-24T07:00:36.7685938Z","lastModifiedAt":"2024-05-24T07:00:36.7685933Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '617' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:38 GMT + etag: + - 21000c75-0000-0100-0000-66503b140000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-msedge-ref: + - 'Ref A: DAED2EC108DA4AB4B08E09ECF61A6BFE Ref B: MAA201060516027 Ref C: 2024-05-24T07:00:37Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"assignedTo": [{"deprecated": false, "entity": "api", "required": + true}, {"deprecated": false, "entity": "environment", "required": true}, {"deprecated": + false, "entity": "deployment", "required": true}], "schema": "{\"type\": \"string\", + \"title\":\"Last name\", \"pattern\": \"^[a-zA-Z0-9]+$\"}"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic metadata update + Connection: + - keep-alive + Content-Length: + - '315' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --service-name --name --schema + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/metadataSchemas","properties":{"assignedTo":[{"entity":"api","required":true,"deprecated":false},{"entity":"environment","required":true,"deprecated":false},{"entity":"deployment","required":true,"deprecated":false}],"schema":"{\"type\": + \"string\", \"title\":\"Last name\", \"pattern\": \"^[a-zA-Z0-9]+$\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/metadataSchemas/clitest000003","name":"clitest000003","systemData":{"lastModifiedAt":"2024-05-24T07:00:41.1276936Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '603' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 07:00:40 GMT + etag: + - 21009c75-0000-0100-0000-66503b190000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: E0883FD551BC47D498EB50FFE0D88569 Ref B: MAA201060516027 Ref C: 2024-05-24T07:00:39Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_service_details.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_service_details.yaml new file mode 100644 index 00000000000..023f99584db --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_update_service_details.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic service update + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + ParameterSetName: + - -g -s + User-Agent: + - AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services","location":"eastus","identity":{"type":"None"},"sku":{"name":"Free"},"properties":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002","name":"clitest000002","tags":{},"systemData":{"createdAt":"2024-05-24T05:46:41.6556889Z","lastModifiedAt":"2024-05-24T05:46:48.2131767Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '402' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 May 2024 05:46:47 GMT + etag: + - 5a007c73-0000-0100-0000-665029c80000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-msedge-ref: + - 'Ref A: EDB98A8EDBCF4ABF91C41DC3B8079C9D Ref B: MAA201060513027 Ref C: 2024-05-24T05:46:46Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_api_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_api_commands.py index 8584b800815..8e0ca26094c 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_api_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_api_commands.py @@ -118,4 +118,79 @@ def test_api_update_with_all_optional_params(self, metadata_name): @ApicApiPreparer() def test_api_delete(self): self.cmd('az apic api delete -g {rg} -s {s} --api-id {api} --yes') - self.cmd('az apic api show -g {rg} -s {s} --api-id {api}', expect_failure=True) \ No newline at end of file + self.cmd('az apic api show -g {rg} -s {s} --api-id {api}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_create_api(self): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24) + }) + self.cmd('az apic api create -g {rg} -s {s} --api-id {name} --title "Echo API" --type REST', checks=[ + self.check('name', '{name}'), + self.check('kind', 'rest'), + self.check('title', 'Echo API'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_create_api_with_custom_properties(self, metadata_name): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24), + 'customProperties': '{{"{}":true}}'.format(metadata_name), + }) + self.cmd('az apic api create -g {rg} -s {s} --api-id {name} --title "Echo API" --type rest --custom-properties \'{customProperties}\'', checks=[ + self.check('name', '{name}'), + self.check('kind', 'rest'), + self.check('title', 'Echo API'), + self.check('customProperties.{}'.format(metadata_name), True), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + def test_examples_delete_api(self): + self.cmd('az apic api delete -g {rg} -s {s} --api-id {api} --yes') + self.cmd('az apic api show -g {rg} -s {s} --api-id {api}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer(parameter_name='api_id1') + @ApicApiPreparer(parameter_name='api_id2') + def test_examples_list_apis(self, api_id1, api_id2): + self.cmd('az apic api list -g {rg} -s {s}', checks=[ + self.check('length(@)', 2), + self.check('@[0].name', api_id1), + self.check('@[1].name', api_id2) + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + def test_examples_show_api_details(self): + self.cmd('az apic api show -g {rg} -s {s} --api-id {api}', checks=[ + self.check('name', '{api}'), + self.check('kind', 'rest'), + self.check('title', 'Echo API'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + def test_examples_update_api(self): + self.cmd('az apic api update -g {rg} -s {s} --api-id {api} --summary "Basic REST API service"', checks=[ + self.check('summary', 'Basic REST API service'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicMetadataPreparer() + def test_examples_update_custom_properties(self, metadata_name): + self.kwargs.update({ + 'customProperties': '{{"{}":true}}'.format(metadata_name), + }) + self.cmd('az apic api update -g {rg} -s {s} --api-id {api} --custom-properties \'{customProperties}\'', checks=[ + self.check('customProperties.{}'.format(metadata_name), True), + ]) \ No newline at end of file diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_assets/petstore.yml b/src/apic-extension/azext_apic_extension/tests/latest/test_assets/petstore.yml new file mode 100644 index 00000000000..7ed987ff63e --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_assets/petstore.yml @@ -0,0 +1,119 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: http://petstore.swagger.io/v1 +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + maximum: 100 + format: int32 + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + summary: Create a pet + operationId: createPets + tags: + - pets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + required: true + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Pet: + type: object + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + maxItems: 100 + items: + $ref: "#/components/schemas/Pet" + Error: + type: object + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py index 4b3cc45a5d4..2b91bcf6605 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py @@ -14,7 +14,7 @@ current_dir = os.path.dirname(os.path.realpath(__file__)) test_assets_dir = os.path.join(current_dir, 'test_assets') -class VersionCommandsTests(ScenarioTest): +class DefinitionCommandsTests(ScenarioTest): @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) @ApicServicePreparer() @@ -207,3 +207,106 @@ def test_definition_import_large_value(self): self.cmd('az apic api definition import-specification -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d} --format "inline" --specification \'{specification}\' --value "@{file_name}"') finally: os.remove(self.kwargs['file_name']) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + def test_examples_create_api_definition(self): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24) + }) + self.cmd('az apic api definition create -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {name} --title "OpenAPI"', checks=[ + self.check('name', '{name}'), + self.check('title', 'OpenAPI'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + def test_examples_delete_api_definition(self): + self.cmd('az apic api definition delete -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d} --yes') + self.cmd('az apic api definition show -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer(parameter_name="definition_id1") + @ApicDefinitionPreparer(parameter_name="definition_id2") + def test_examples_list_api_definitions(self, definition_id1, definition_id2): + self.cmd('az apic api definition list -g {rg} -s {s} --api-id {api} --version-id {v}', checks=[ + self.check('length(@)', 2), + self.check('[0].name', definition_id1), + self.check('[1].name', definition_id2), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + def test_examples_show_api_definition_details(self): + self.cmd('az apic api definition show -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d}', checks=[ + self.check('name', '{d}'), + self.check('title', 'OpenAPI'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + def test_examples_update_api_definition(self): + self.cmd('az apic api definition update -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d} --title "OpenAPI"', checks=[ + self.check('name', '{d}'), + self.check('title', 'OpenAPI'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + def test_examples_import_specification_example_1(self): + self.kwargs.update({ + 'value': '{"openapi":"3.0.1","info":{"title":"httpbin.org","description":"API Management facade for a very handy and free online HTTP tool.","version":"1.0"}}', + 'specification': '{"name":"openapi","version":"3.0.0"}' + }) + self.cmd('az apic api definition import-specification -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d} --format "inline" --value \'{value}\' --specification \'{specification}\'') + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + def test_examples_import_specification_example_2(self): + self.kwargs.update({ + 'value': 'https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json', + 'specification': '{"name":"openapi","version":"3.0.0"}' + }) + self.cmd('az apic api definition import-specification -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d} --format "link" --value \'{value}\' --specification \'{specification}\'') + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + def test_examples_export_specification(self): + self.kwargs.update({ + 'value': 'https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json', + 'specification': '{"name":"openapi","version":"3.0.0"}', + 'filename': "test_examples_export_specification.json" + }) + # Import a specification first + self.cmd('az apic api definition import-specification -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d} --format "link" --value \'{value}\' --specification \'{specification}\'') + + self.cmd('az apic api definition export-specification -g {rg} -s {s} --api-id {api} --version-id {v} --definition-id {d} --file-name {filename}') + + try: + # Check the exported file exists + assert os.path.exists(self.kwargs['filename']) + finally: + os.remove(self.kwargs['filename']) \ No newline at end of file diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_deployment_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_deployment_commands.py index c278d82a3d3..5c1e2b0bda2 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_deployment_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_deployment_commands.py @@ -143,4 +143,74 @@ def test_deployment_update_with_all_optional_params(self, metadata_name): @ApicDeploymentPreparer() def test_deployment_delete(self): self.cmd('az apic api deployment delete -g {rg} -s {s} --api-id {api} --deployment-id {dep} --yes') - self.cmd('az apic api deployment show -g {rg} -s {s} --api-id {api} --deployment-id {dep}', expect_failure=True) \ No newline at end of file + self.cmd('az apic api deployment show -g {rg} -s {s} --api-id {api} --deployment-id {dep}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + def test_examples_create_deployment(self): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24), + 'server': '{"runtimeUri":["https://example.com"]}', + }) + self.cmd('az apic api deployment create -g {rg} -s {s} --deployment-id {name} --title "Production deployment" --description "Public cloud production deployment." --api-id {api} --environment-id "/workspaces/default/environments/{e}" --definition-id "/workspaces/default/apis/{api}/versions/{v}/definitions/{d}" --server \'{server}\'', checks=[ + self.check('name', '{name}'), + self.check('title', 'Production deployment'), + self.check('description', 'Public cloud production deployment.'), + self.check('server.runtimeUri[0]', 'https://example.com'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + @ApicDeploymentPreparer() + def test_examples_delete_api_deployment(self): + self.cmd('az apic api deployment delete -g {rg} -s {s} --deployment-id {dep} --api-id {api} --yes') + self.cmd('az apic api deployment show -g {rg} -s {s} --api-id {api} --deployment-id {dep}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + @ApicDeploymentPreparer(parameter_name='deployment_id1') + @ApicDeploymentPreparer(parameter_name='deployment_id2') + def test_examples_list_api_deployments(self, deployment_id1, deployment_id2): + self.cmd('az apic api deployment list -g {rg} -s {s} --api-id {api}', checks=[ + self.check('length(@)', 2), + self.check('[0].name', deployment_id1), + self.check('[1].name', deployment_id2), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + @ApicDeploymentPreparer() + def test_examples_show_api_deployment_details(self): + self.cmd('az apic api deployment show -g {rg} -s {s} --deployment-id {dep} --api-id {api}', checks=[ + self.check('name', '{dep}'), + self.check('title', 'test deployment'), + self.check('server.runtimeUri[0]', 'https://example.com'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + @ApicDefinitionPreparer() + @ApicDeploymentPreparer() + def test_examples_update_api_deployment(self): + self.cmd('az apic api deployment update -g {rg} -s {s} --deployment-id {dep} --title "Production deployment" --api-id {api}', checks=[ + self.check('title', 'Production deployment'), + ]) \ No newline at end of file diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_environment_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_environment_commands.py index cad9173e32a..f48a5a26bfb 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_environment_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_environment_commands.py @@ -113,4 +113,50 @@ def test_environment_update_with_all_optional_params(self, metadata_name): @ApicEnvironmentPreparer() def test_environment_delete(self): self.cmd('az apic environment delete -g {rg} -s {s} --environment-id {e} --yes') - self.cmd('az apic environment show -g {rg} -s {s} --environment-id {e}', expect_failure=True) \ No newline at end of file + self.cmd('az apic environment show -g {rg} -s {s} --environment-id {e}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_create_environment(self): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24) + }) + self.cmd('az apic environment create -g {rg} -s {s} --environment-id {name} --title "Public cloud" --type "development"', checks=[ + self.check('name', '{name}'), + self.check('title', 'Public cloud'), + self.check('kind', 'development') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + def test_examples_delete_environment(self): + self.cmd('az apic environment delete -g {rg} -s {s} --environment-id {e} --yes') + self.cmd('az apic environment show -g {rg} -s {s} --environment-id {e}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer(parameter_name='environment_name1') + @ApicEnvironmentPreparer(parameter_name='environment_name2') + def test_examples_list_environments(self, environment_name1, environment_name2): + self.cmd('az apic environment list -g {rg} -s {s}', checks=[ + self.check('length(@)', 2), + self.check('@[0].name', environment_name1), + self.check('@[1].name', environment_name2) + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + def test_examples_show_environment_details(self): + self.cmd('az apic environment show -g {rg} -s {s} --environment-id {e}', checks=[ + self.check('name', '{e}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + def test_examples_update_environment(self): + self.cmd('az apic environment update -g {rg} -s {s} --environment-id {e} --title "Public cloud"', checks=[ + self.check('title', 'Public cloud') + ]) diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_metadata_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_metadata_commands.py index a909075f7dc..39f1d4e50d8 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_metadata_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_metadata_commands.py @@ -100,4 +100,116 @@ def test_metadata_export(self): assert 'properties' in data['properties']['customProperties'], "properties not found in customProperties" assert len(data['properties']['customProperties']['properties']) == 1, "The number of properties in customProperties does not match the expected number" finally: - os.remove(self.kwargs['filename']) \ No newline at end of file + os.remove(self.kwargs['filename']) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_create_metadata_1(self): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24), + 'schema': '{"type":"string", "title":"First name", "pattern": "^[a-zA-Z0-9]+$"}', + 'assignments': '[{entity:api,required:true,deprecated:false}]' + }) + self.cmd('az apic metadata create --resource-group {rg} --service-name {s} --name {name} --schema \'{schema}\' --assignments \'{assignments}\'', checks=[ + self.check('name', '{name}'), + self.check('schema', '{schema}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_create_metadata_2(self): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24), + 'schema': '{"type":"string","title":"testregion","oneOf":[{"const":"Region1","description":""},{"const":"Region2","description":""},{"const":"Region3","description":""}]}', + 'assignments': '[{entity:api,required:true,deprecated:false},{entity:environment,required:true,deprecated:false}]' + }) + self.cmd('az apic metadata create --resource-group {rg} --service-name {s} --name {name} --schema \'{schema}\' --assignments \'{assignments}\'', checks=[ + self.check('name', '{name}'), + self.check('schema', '{schema}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_delete_metadata_1(self): + self.cmd('az apic metadata delete --resource-group {rg} --service-name {s} --name {m} --yes') + self.cmd('az apic metadata show --resource-group {rg} --service-name {s} --name {m}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_delete_metadata_2(self): + self.cmd('az apic metadata delete -g {rg} -s {s} --name {m} --yes') + self.cmd('az apic metadata show -g {rg} -s {s} --name {m}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_export_metadata_assigned_to_api(self): + self.kwargs.update({ + 'filename': 'test_examples_export_metadata_assigned_to_api.json' + }) + self.cmd('az apic metadata export -g {rg} -s {s} --assignments api --file-name {filename}') + + os.remove(self.kwargs['filename']) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_export_metadata_assigned_to_deployment(self): + self.kwargs.update({ + 'filename': 'test_examples_export_metadata_assigned_to_deployment.json' + }) + self.cmd('az apic metadata export -g {rg} -s {s} --assignments deployment --file-name {filename}') + + os.remove(self.kwargs['filename']) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_export_metadata_assigned_to_environment(self): + self.kwargs.update({ + 'filename': 'test_examples_export_metadata_assigned_to_environment.json' + }) + self.cmd('az apic metadata export -g {rg} -s {s} --assignments environment --file-name {filename}') + + os.remove(self.kwargs['filename']) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer(parameter_name='metadata_name1') + @ApicMetadataPreparer(parameter_name='metadata_name2') + def test_examples_list_metadata(self, metadata_name1, metadata_name2): + self.cmd('az apic metadata list -g {rg} -s {s}', checks=[ + self.check('length(@)', 2), + self.check('@[0].name', metadata_name1), + self.check('@[1].name', metadata_name2) + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_show_metadata_1(self): + self.cmd('az apic metadata show -g {rg} -s {s} --name {m}', checks=[ + self.check('name', '{m}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_show_metadata_2(self): + self.cmd('az apic metadata show --resource-group {rg} --service-name {s} --name {m}', checks=[ + self.check('name', '{m}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicMetadataPreparer() + def test_examples_update_metadata(self): + self.kwargs.update({ + 'schema': '{"type": "string", "title":"Last name", "pattern": "^[a-zA-Z0-9]+$"}' + }) + self.cmd('az apic metadata update --resource-group {rg} --service-name {s} --name {m} --schema \'{schema}\'', checks=[ + self.check('name', '{m}'), + self.check('schema', '{schema}') + ]) \ No newline at end of file diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py b/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py index 3ebfed84c55..e1c9e59e59a 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py @@ -6,7 +6,7 @@ import os from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer -from .utils import ApicServicePreparer +from .utils import ApicServicePreparer, ApicEnvironmentPreparer current_dir = os.path.dirname(os.path.realpath(__file__)) test_assets_dir = os.path.join(current_dir, 'test_assets') @@ -125,4 +125,22 @@ def test_register_with_long_openapi_description(self): # verify command results self.cmd('az apic api show -g {rg} -s {s} --api-id swaggerpetstore-openapi30', checks=[ self.check('description', 'This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we\'ve switched to the design first approach!\nYou can now help us improve the API whether it\'s by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we\'ve switched to the design first approach!\nYou can now help us improve the API whether it\'s by making changes to the') - ]) \ No newline at end of file + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + def test_examples_register_with_json_spec(self): + self.kwargs.update({ + 'spec_file': os.path.join(test_assets_dir, 'petstore.json') + }) + self.cmd('az apic api register -g {rg} -s {s} --api-location "{spec_file}" --environment-name {e}') + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicEnvironmentPreparer() + def test_examples_register_with_yml_spec(self): + self.kwargs.update({ + 'spec_file': os.path.join(test_assets_dir, 'petstore.yml') + }) + self.cmd('az apic api register -g {rg} -s {s} --api-location "{spec_file}" --environment-name {e}') diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py index 74c94d3c5ad..f8e86c3d14b 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py @@ -131,6 +131,76 @@ def test_import_from_apim_for_multiple_apis(self): self.check('any(@[*].title == `Foo API`)', True) ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + def test_examples_create_service_1(self, resource_group): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24), + 'rg': resource_group + }) + self.cmd('az apic service create -g {rg} -s {name} -l eastus', checks=[ + self.check('name', '{name}'), + self.check('resourceGroup', '{rg}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + def test_examples_create_service_2(self, resource_group): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24), + 'rg': resource_group + }) + self.cmd('az apic service create --resource-group {rg} --name {name} --location eastus', checks=[ + self.check('name', '{name}'), + self.check('resourceGroup', '{rg}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_delete_service(self): + self.cmd('az apic service delete -s {s} -g {rg} --yes') + self.cmd('az apic service show -g {rg} -s {s}', expect_failure=True) + + @unittest.skip('The Control Plane API has bug') + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer(enable_system_assigned_identity=True) + def test_examples_import_all_apis_from_apim(self): + self.kwargs.update({ + 'apim_name': self.create_random_name(prefix='cli', length=24) + }) + self._prepare_apim() + self.cmd('az apic service import-from-apim -g {rg} --service-name {s} --apim-name {apim_name} --apim-apis *') + + @unittest.skip('The Control Plane API has bug') + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer(enable_system_assigned_identity=True) + def test_examples_import_selected_apis_from_apim(self): + self.kwargs.update({ + 'apim_name': self.create_random_name(prefix='cli', length=24) + }) + self._prepare_apim() + self.cmd('az apic service import-from-apim -g {rg} --service-name {s} --apim-name {apim_name} --apim-apis [echo,foo]') + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_list_services_in_resource_group(self): + self.cmd('az apic service list -g {rg}', checks=[ + self.check('length(@)', 1), + self.check('@[0].name', '{s}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_show_service_details(self): + self.cmd('az apic service show -g {rg} -s {s}', checks=[ + self.check('name', '{s}'), + self.check('resourceGroup', '{rg}') + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + def test_examples_update_service_details(self): + self.cmd('az apic service update -g {rg} -s {s}') + def _prepare_apim(self): if self.is_live: # Only setup APIM in live mode @@ -152,4 +222,4 @@ def _prepare_apim(self): 'apim_id': apim_id }) # Grant system assigned identity of API Center access to APIM - self.cmd('az role assignment create --role "API Management Service Reader Role" --assignee-object-id {identity_id} --assignee-principal-type ServicePrincipal --scope {apim_id}') \ No newline at end of file + self.cmd('az role assignment create --role "API Management Service Reader Role" --assignee-object-id {identity_id} --assignee-principal-type ServicePrincipal --scope {apim_id}') diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_version_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_version_commands.py index 6d03e3651c5..07766b48487 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_version_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_version_commands.py @@ -74,4 +74,54 @@ def test_version_update(self): @ApicVersionPreparer() def test_version_delete(self): self.cmd('az apic api version delete -g {rg} -s {s} --api-id {api} --version-id {v} --yes') - self.cmd('az apic api version show -g {rg} -s {s} --api-id {api} --version-id {v}', expect_failure=True) \ No newline at end of file + self.cmd('az apic api version show -g {rg} -s {s} --api-id {api} --version-id {v}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + def test_examples_create_api_version(self): + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli', length=24) + }) + self.cmd('az apic api version create -g {rg} -s {s} --api-id {api} --version-id {name} --title "2023-01-01" --lifecycle-stage production', checks=[ + self.check('name', '{name}'), + self.check('title', '2023-01-01'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + def test_examples_delete_api_version(self): + self.cmd('az apic api version delete -g {rg} -s {s} --api-id {api} --version-id {v} --yes') + self.cmd('az apic api version show -g {rg} -s {s} --api-id {api} --version-id {v}', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer(parameter_name='version_id1') + @ApicVersionPreparer(parameter_name='version_id2') + def test_examples_list_api_versions(self, version_id1, version_id2): + self.cmd('az apic api version list -g {rg} -s {s} --api-id {api}', checks=[ + self.check('length(@)', 2), + self.check('@[0].name', version_id1), + self.check('@[1].name', version_id2) + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + def test_examples_show_api_version_details(self): + self.cmd('az apic api version show -g {rg} -s {s} --api-id {api} --version-id {v}', checks=[ + self.check('name', '{v}'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location='eastus', random_name_length=32) + @ApicServicePreparer() + @ApicApiPreparer() + @ApicVersionPreparer() + def test_examples_update_api_version(self): + self.cmd('az apic api version update -g {rg} -s {s} --api-id {api} --version-id {v} --title "2023-01-01"', checks=[ + self.check('title', '2023-01-01'), + ]) \ No newline at end of file