Skip to content

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for grouping APIs by tags.",
"version": "2017-03-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
],
"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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags": {
"get": {
"tags": [
"ApisByTags"
],
"operationId": "ApisByTags_ListByService",
"description": "Lists a collection of apis associated with tags.",
"x-ms-examples": {
"ApiManagementListApisByTags": {
"$ref": "./examples/ApiManagementListApisByTags.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| isCurrent | eq | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of TagResource entities.",
"schema": {
"$ref": "./apimtagresources.json#/definitions/TagResourceCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "./apimtagresources.json#/definitions/TagResourceContract"
}
}
},
"definitions": {
},
"parameters": {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@
"required": [
"displayName"
],
"description": "Developer group."
"description": "Group contract Properties."
},
"GroupCreateParameters": {
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,282 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags": {
"get": {
"tags": [
"ProductTags"
],
"operationId": "Tags_ListByProduct",

@fearthecowboy fearthecowboy Jan 17, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This operation is Tags_ListByProduct the next is Tag_HeadByProduct

The prefix should be consistent between operations (Tag or Tags, but not both)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have used a singular case in all other operations. @vfedonkin let's use Tag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, using "Tag" everywhere.

"description": "Lists all Tags associated with the Product.",
"x-ms-examples": {
"ApiManagementGetTagsForProduct": {
"$ref": "./examples/ApiManagementGetTagsForProduct.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/ProductIdParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The operation returns a collection of tags associated with the Product entity.",
"schema": {
"$ref": "./apimtags.json#/definitions/TagCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "./apimtags.json#/definitions/TagContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}": {
"head": {
"tags": [
"ProductTags"
],
"operationId": "Tag_HeadByProduct",

@fearthecowboy fearthecowboy Jan 17, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't see a lot of HEAD operations.

The operationId should describe what the operation does, not the HTTP Method used-- I'd suggest Tag_GetEntityState

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. The same for apis/operations/tags entities.

"description": "Gets the entity state version of the tag specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadProductTag": {
"$ref": "./examples/ApiManagementHeadProductTag.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/ProductIdParameter"
},
{
"$ref": "#./apimtags.json#/parameters/TagIdParameter"

@solankisamir solankisamir Jan 12, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#./ [](start = 21, length = 3)

maybe this is what the CI job is complaining about. #Resolved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Empty response body, ETag header entity state version.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"ProductTags"
],
"operationId": "Tag_GetByProduct",

@fearthecowboy fearthecowboy Jan 17, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend this was just Tag_Get -- the operation Id is used to generate method names, and unless there is an overriding or compelling reason, we'd like to stick to common patterns.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fearthecowboy
We already have Tag_Get in apimtags.json with url like
".../service/{serviceName}/tags/{tagId}"
Can we use the same operationId for
".../service/{serviceName}/products/{productId}/tags/{tagId}" ?

"description": "Get tag associated with the Product.",
"x-ms-examples": {
"ApiManagementGetProductTag": {
"$ref": "./examples/ApiManagementGetProductTag.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/ProductIdParameter"
},
{
"$ref": "#./apimtags.json#/parameters/TagIdParameter"

@solankisamir solankisamir Jan 12, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#./ [](start = 21, length = 3)

check this #Resolved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Gets the details of the tag specified by its identifier.",
"schema": {
"$ref": "#./apimtags.json#/definitions/TagContract"

@solankisamir solankisamir Jan 12, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#./ [](start = 23, length = 3)

check this. #Resolved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"ProductTags"
],
"operationId": "Tag_CreateOrUpdateForProduct",

@fearthecowboy fearthecowboy Jan 17, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend this was just Tag_CreateOrUpdate -- the operation Id is used to generate method names, and unless there is an overriding or compelling reason, we'd like to stick to common patterns.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to Tag_AssignToProduct. Same for Tag_AssignToApi and Tag_AssignToOperation

"description": "Assign tag to the Product.",
"x-ms-examples": {
"ApiManagementCreateProductTag": {
"$ref": "./examples/ApiManagementCreateProductTag.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/ProductIdParameter"
},
{
"$ref": "#./apimtags.json#/parameters/TagIdParameter"
},
{
"name": "If-Match",
"in": "header",
"required": false,
"description": "The entity state (Etag) version of the Tag to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.",
"type": "string"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Tag was assigned to the Product.",
"schema": {
"$ref": "#./apimtags.json#/definitions/TagContract"
}
},
"200": {
"description": "Tag is already assigned to the Product.",
"schema": {
"$ref": "#./apimtags.json#/definitions/TagContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"ProductTags"
],
"operationId": "Tag_DeleteFromProduct",

@fearthecowboy fearthecowboy Jan 17, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend this was just Tag_Delete -- the operation Id is used to generate method names, and unless there is an overriding or compelling reason, we'd like to stick to common patterns.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to Tag_DetachFromProduct. Same for Tag_DetachFromApi and Tag_DetachFromOperation

"description": "Detach the tag from the Product.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description "Detach the tag from the Product.", sounds like the tag still exists once deleted. Can we say Deletes or removes ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tag is really exists as an entity, it's just detached from the product.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. interesting.

"x-ms-examples": {
"ApiManagementDeleteProductTag": {
"$ref": "./examples/ApiManagementDeleteProductTag.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/ProductIdParameter"
},
{
"$ref": "#./apimtags.json#/parameters/TagIdParameter"
},
{
"name": "If-Match",
"in": "header",
"required": true,
"description": "The entity state (Etag) version of the Api schema to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.",
"type": "string"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Successfully detached the tag from the Product."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}

},
"definitions": {
"ProductCollection": {
Expand Down
Loading