Skip to content

Commit

Permalink
apim /PUT apis import add translateRequiredQueryParameters (#20333)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeagleGross committed Aug 24, 2022
1 parent a602b84 commit 5256a61
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@
"ApiManagementCreateApiUsingOai3Import": {
"$ref": "./examples/ApiManagementCreateApiUsingOai3Import.json"
},
"ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct": {
"$ref": "./examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json"
},
"ApiManagementCreateApiUsingSwaggerImport": {
"$ref": "./examples/ApiManagementCreateApiUsingSwaggerImport.json"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}

0 comments on commit 5256a61

Please sign in to comment.