diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/apimapis.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/apimapis.json index a685513f6bf4..a17597e9a513 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/apimapis.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/apimapis.json @@ -222,6 +222,9 @@ "ApiManagementCreateApiUsingOai3Import": { "$ref": "./examples/ApiManagementCreateApiUsingOai3Import.json" }, + "ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct": { + "$ref": "./examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json" + }, "ApiManagementCreateApiUsingSwaggerImport": { "$ref": "./examples/ApiManagementCreateApiUsingSwaggerImport.json" }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/definitions.json index 724bbffeafb9..11ee1710d5d1 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/definitions.json @@ -437,6 +437,31 @@ } ] } + }, + "translateRequiredQueryParameters": { + "type": "string", + "description": "Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'", + "enum": [ + "template", + "query" + ], + "x-ms-client-name": "TranslateRequiredQueryParametersConduct", + "x-ms-enum": { + "name": "TranslateRequiredQueryParametersConduct", + "modelAsString": true, + "values": [ + { + "value": "template", + "description": "Translates required query parameters to template ones. Is a default value", + "name": "Template" + }, + { + "value": "query", + "description": "Leaves required query parameters as they are (no translation done).", + "name": "Query" + } + ] + } } }, "allOf": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json new file mode 100644 index 000000000000..ec39ad14e08f --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2022-04-01-preview", + "subscriptionId": "subid", + "apiId": "petstore", + "parameters": { + "properties": { + "format": "openapi-link", + "value": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", + "path": "petstore", + "translateRequiredQueryParameters": "template" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "name": "petstoreapi", + "properties": { + "displayName": "Swagger Petstore", + "apiRevision": "1", + "serviceUrl": "http://petstore.swagger.io/v1", + "path": "petstore", + "protocols": [ + "https" + ], + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "isCurrent": true + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2022-04-01-preview&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "name": "petstoreapi", + "properties": { + "displayName": "Swagger Petstore", + "apiRevision": "1", + "serviceUrl": "http://petstore.swagger.io/v1", + "path": "petstore", + "protocols": [ + "https" + ], + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "isCurrent": true + } + } + } + } +}