Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,34 @@
"tags": [
"Applications"
],
"description": "Lists all of the applications HDInsight cluster.",
"description": "Lists all of the applications for the HDInsight cluster.",
"operationId": "Applications_List",
"x-ms-examples": {
"Get All Applications for an HDInsight cluster": {
"$ref": "./examples/GetAllApplications.json"
}
},
"parameters": [{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"name": "clusterName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the cluster."
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "OK. The request has succeeded.",
"schema": {
Expand Down Expand Up @@ -93,35 +92,30 @@
"$ref": "./examples/GetApplicationInProgress.json"
}
},
"parameters": [{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"name": "clusterName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the cluster."
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "#/parameters/ApplicationNameParameter"
},
{
"name": "applicationName",
"in": "path",
"required": true,
"type": "string",
"description": "The constant value for the application name."
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "OK. The request has succeeded.",
"schema": {
Expand All @@ -141,58 +135,47 @@
"$ref": "./examples/CreateApplication.json"
}
},
"parameters": [{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"name": "clusterName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the cluster."
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"name": "applicationName",
"in": "path",
"required": true,
"type": "string",
"description": "The constant value for the application name.",
"enum": [
"hue"
],
"x-ms-enum": {
"name": "ApplicationName",
"modelAsString": false
}
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/ApplicationNameParameter"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

{
  "id": "1016",
  "code": "ConstantStatusHasChanged",
  "message": "The 'constant' status changed from the old version to the new.",
  "jsonref": "#/paths/~1subscriptions~1{subscriptionId}~1resourceGroups~1{resourceGroupName}~1providers~1Microsoft.HDInsight~1clusters~1{clusterName}~1applications~1{applicationName}/put/applicationName",
  "json-path": "#/paths/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}/put/applicationName",
  "type": "Error"
}

This is a breaking change in SDKs in each language. The previous version had Enum with a single value "hue". The new one have a free form string. Relates to Put and Delete operations.

Copy link
Contributor Author

@wawon-msft wawon-msft Jun 18, 2018

Choose a reason for hiding this comment

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

This should not have been an enum in the first place. The service accepted values other than "hue" before the enum constraint was introduced, and this would break the existing SDK. Additionally, the values for application name are dynamic, so it wasn't appropriate to use enums for them.

{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApplicationGetProperties"
"$ref": "#/definitions/ApplicationProperties"
},
"description": "The application create request."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/Application"
}
}
}
},
"x-ms-long-running-operation": true
},
"delete": {
"tags": [
Expand All @@ -205,44 +188,35 @@
"$ref": "./examples/DeleteApplication.json"
}
},
"parameters": [{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"name": "clusterName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the cluster."
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"name": "applicationName",
"in": "path",
"required": true,
"type": "string",
"description": "The constant value for the application name.",
"enum": [
"hue"
],
"x-ms-enum": {
"name": "ApplicationName",
"modelAsString": false
}
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
"$ref": "#/parameters/ApplicationNameParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "OK. The request has succeeded."
},
"202": {
"description": "Accepted response definition."
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -300,7 +274,7 @@
}
}
},
"ApplicationGetProperties": {
"ApplicationProperties": {
"description": "The HDInsight cluster application GET response.",
"type": "object",
"properties": {
Expand Down Expand Up @@ -353,7 +327,7 @@
"errors": {
"type": "array",
"items": {
"$ref": "./cluster.json#/definitions/errors"
"$ref": "./cluster.json#/definitions/Errors"
},
"description": "The list of errors."
},
Expand Down Expand Up @@ -394,7 +368,7 @@
}
},
"properties": {
"$ref": "#/definitions/ApplicationGetProperties",
"$ref": "#/definitions/ApplicationProperties",
"description": "The properties of the application."
}
}
Expand Down Expand Up @@ -425,6 +399,30 @@
"type": "string",
"description": "The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
},
"ResourceGroupNameParameter": {
"name": "resourceGroupName",
Copy link
Contributor

Choose a reason for hiding this comment

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

this parameter should be specified on the method and not on the client - i.e. please add "x-ms-parameter-location": "method" property.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group.",
"x-ms-parameter-location": "method"
},
"ClusterNameParameter": {
"name": "clusterName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the cluster.",
"x-ms-parameter-location": "method"
},
"ApplicationNameParameter": {
"name": "applicationName",
"in": "path",
"required": true,
"type": "string",
"description": "The constant value for the application name.",
"x-ms-parameter-location": "method"
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
Expand Down
Loading