Skip to content

Commit

Permalink
Event Hub : Split swagger in to entities (Azure#8987)
Browse files Browse the repository at this point in the history
* splitted 2017 and 2018 API version swagger

* Lint fix

* fix Prettier Check

* corrected the examples and readme file

* corrected definations paths

* update

* prettier check fix

* added description

* updated description

* corrected parameter location

Co-authored-by: v-ajnava <[email protected]>
  • Loading branch information
2 people authored and 00Kai0 committed Oct 12, 2020
1 parent f13d985 commit 586ed32
Show file tree
Hide file tree
Showing 23 changed files with 5,604 additions and 5,024 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
{
"swagger": "2.0",
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"info": {
"version": "2017-04-01",
"title": "Common types"
},
"paths": {},
"definitions": {
"TrackedResource": {
"properties": {
"location": {
"type": "string",
"x-ms-mutability": [
"read",
"create"
],
"description": "Resource location."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags."
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "Definition of resource."
},
"Resource": {
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource ID."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type."
}
},
"description": "The resource definition.",
"x-ms-azure-resource": true
},
"ErrorResponse": {
"description": "Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message.",
"type": "object",
"properties": {
"code": {
"description": "Error code.",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
}
}
}
},
"parameters": {
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Client API Version."
},
"ResourceGroupNameParameter": {
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"maxLength": 90,
"x-ms-parameter-location": "method",
"description": "Name of the resource group within the azure subscription."
},
"NamespaceNameParameter": {
"name": "namespaceName",
"in": "path",
"required": true,
"type": "string",
"minLength": 6,
"maxLength": 50,
"x-ms-parameter-location": "method",
"description": "The Namespace name"
},
"EventHubNameParameter": {
"name": "eventHubName",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"maxLength": 50,
"x-ms-parameter-location": "method",
"description": "The Event Hub name"
},
"ConsumerGroupNameParameter": {
"name": "consumerGroupName",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"maxLength": 50,
"x-ms-parameter-location": "method",
"description": "The consumer group name"
},
"SkipParameter": {
"name": "$skip",
"description": "Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls.",
"in": "query",
"required": false,
"type": "integer",
"minimum": 0,
"maximum": 1000,
"x-ms-parameter-location": "method"
},
"TopParameter": {
"name": "$top",
"description": "May be used to limit the number of results to the most recent N usageDetails.",
"in": "query",
"required": false,
"type": "integer",
"minimum": 1,
"maximum": 1000,
"x-ms-parameter-location": "method"
},
"AuthorizationRuleNameParameter": {
"name": "authorizationRuleName",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"x-ms-parameter-location": "method",
"description": "The authorization rule name."
},
"AliasNameParameter": {
"name": "alias",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"maxLength": 50,
"x-ms-parameter-location": "method",
"description": "The Disaster Recovery configuration name"
},
"ClusterNameParameter": {
"name": "clusterName",
"in": "path",
"required": true,
"type": "string",
"minLength": 6,
"maxLength": 50,
"x-ms-parameter-location": "method",
"description": "The name of the Event Hubs Cluster."
},
"IpFilterRuleNameParameter": {
"name": "ipFilterRuleName",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"x-ms-parameter-location": "method",
"description": "The IP Filter Rule name."
},
"VirtualNetworkRuleNameParameter": {
"name": "virtualNetworkRuleName",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"x-ms-parameter-location": "method",
"description": "The Virtual Network Rule name."
},
"SkuNameParameter": {
"name": "sku",
"in": "path",
"required": true,
"type": "string",
"minLength": 1,
"maxLength": 50,
"x-ms-parameter-location": "method",
"description": "The sku type."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"swagger": "2.0",
"info": {
"title": "EventHubManagementClient",
"description": "Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources.",
"version": "2018-01-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions": {
"get": {
"tags": [
"Event Hubs Clusters"
],
"operationId": "Clusters_ListAvailableClusters",
"x-ms-examples": {
"ListAvailableClusters": {
"$ref": "./examples/Clusters/ListAvailableClustersGet.json"
}
},
"description": "List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region.",
"parameters": [
{
"$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Available clusters listed successfully.",
"schema": {
"$ref": "#/definitions/AvailableClustersList"
}
},
"default": {
"description": "Error response describing why available clusters could not be successfully listed.",
"schema": {
"$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"AvailableClustersList": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/AvailableCluster"
},
"description": "The count of readily available and pre-provisioned Event Hubs Clusters per region."
}
},
"description": "The response of the List Available Clusters operation."
},
"AvailableCluster": {
"properties": {
"location": {
"type": "string",
"description": "Location fo the Available Cluster"
}
},
"description": "Pre-provisioned and readily available Event Hubs Cluster count per region."
}
},
"parameters": {}
}
Loading

0 comments on commit 586ed32

Please sign in to comment.