Skip to content

Commit

Permalink
Added support for GraphQL API type (Azure#14851)
Browse files Browse the repository at this point in the history
* Added support for GraphQL API type

* Added missing enum value for GraphQL APIs.
  • Loading branch information
azaslonov authored and solankisamir committed Aug 27, 2021
1 parent b68a16a commit 71b60fa
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 6 deletions.
1 change: 1 addition & 0 deletions azure-rest-api-specs
Submodule azure-rest-api-specs added at c6c46a
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@
},
"ApiManagementCreateApiUsingImportOverrideServiceUrl": {
"$ref": "./examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json"
},
"ApiManagementCreateGraphQLApi": {
"$ref": "./examples/ApiManagementCreateGraphQLApi.json"
}
},
"parameters": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@
"openapi",
"openapi+json",
"openapi-link",
"openapi+json-link"
"openapi+json-link",
"graphql-link"
],
"x-ms-enum": {
"name": "ContentFormat",
Expand Down Expand Up @@ -378,6 +379,10 @@
{
"value": "openapi+json-link",
"description": "The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address."
},
{
"value": "graphql-link",
"description": "The GraphQL API endpoint hosted on a publicly accessible internet address."
}
]
}
Expand All @@ -398,11 +403,12 @@
},
"apiType": {
"type": "string",
"description": "Type of API to create. \n * `http` creates a REST API \n * `soap` creates a SOAP pass-through API \n * `websocket` creates websocket API.",
"description": "Type of API to create. \n * `http` creates a REST API \n * `soap` creates a SOAP pass-through API \n * `websocket` creates websocket API \n * `graphql` creates GraphQL API.",
"enum": [
"http",
"soap",
"websocket"
"websocket",
"graphql"
],
"x-ms-client-name": "SoapApiType",
"x-ms-enum": {
Expand All @@ -416,13 +422,18 @@
},
{
"value": "soap",
"description": "Imports the Soap API having a SOAP front end.",
"description": "Imports the SOAP API having a SOAP front end.",
"name": "SoapPassThrough"
},
{
"value": "websocket",
"description": "Imports the Soap API having a Websocket front end.",
"description": "Imports the API having a Websocket front end.",
"name": "WebSocket"
},
{
"value": "graphql",
"description": "Imports the API having a GraphQL front end.",
"name": "GraphQL"
}
]
}
Expand Down Expand Up @@ -455,7 +466,8 @@
"enum": [
"http",
"soap",
"websocket"
"websocket",
"graphql"
],
"x-ms-client-name": "ApiType",
"x-ms-enum": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2021-04-01-preview",
"subscriptionId": "subid",
"apiId": "tempgroup",
"parameters": {
"properties": {
"description": "apidescription5200",
"displayName": "apiname1463",
"type": "graphql",
"serviceUrl": "https://api.spacex.land/graphql",
"path": "graphql-api",
"protocols": [
"http",
"https"
]
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419",
"type": "Microsoft.ApiManagement/service/apis",
"name": "apiid9419",
"properties": {
"displayName": "apiname1463",
"apiRevision": "1",
"description": "apidescription5200",
"serviceUrl": "https://api.spacex.land/graphql",
"type": "graphql",
"path": "graphql-api",
"protocols": [
"https",
"https"
],
"authenticationSettings": null,
"subscriptionKeyParameterNames": null,
"isCurrent": true,
"isOnline": true
}
}
},
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-04-01-preview&asyncId=5c730e343244df1b9cb56e85&asyncCode=201"
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419",
"type": "Microsoft.ApiManagement/service/apis",
"name": "apiid9419",
"properties": {
"displayName": "apiname1463",
"apiRevision": "1",
"description": "apidescription5200",
"serviceUrl": "https://api.spacex.land/graphql",
"type": "graphql",
"path": "graphql-api",
"protocols": [
"http",
"https"
],
"authenticationSettings": null,
"subscriptionKeyParameterNames": null,
"isCurrent": true,
"isOnline": true
}
}
}
}
}

0 comments on commit 71b60fa

Please sign in to comment.