-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[HDInsight] Refactoring and bug fixes #3256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
46b2c1a
Fixed inaccurate API specifications for HDInsight extensions: 1. typo…
wawon-msft 45dfa6f
Minor refactoring: 1. Organized shared parameters (e.g. resource grou…
wawon-msft e7115d2
Updated examples for extensions with valid response status code.
wawon-msft ed030b0
Removed update configuration API specific for gateway
wawon-msft d025f34
Removed the capabilities API, added the usages API
wawon-msft 683b4e5
Reverted capabilities change and created new API version with the cap…
wawon-msft 7568349
Various minor changes: fixed API version in specs and examples, renam…
wawon-msft 223eddb
Fixed bug for applications where expected response was missing
wawon-msft 5145fb3
Renamed operation that lists script actions
wawon-msft 36ee7b1
Fixed examples for applications to include expected status code from …
wawon-msft c3c62d0
Fixed inconsistent description for Operation in cluster.json
wawon-msft 332ca04
Removed unnecessary definition, added default responses on all endpoints
wawon-msft 4e88cba
Fixed PascalCasing of properties, and made Locations plural in operat…
wawon-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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": { | ||
|
|
@@ -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": { | ||
|
|
@@ -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" | ||
| }, | ||
| { | ||
| "$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": [ | ||
|
|
@@ -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 | ||
|
|
@@ -300,7 +274,7 @@ | |
| } | ||
| } | ||
| }, | ||
| "ApplicationGetProperties": { | ||
| "ApplicationProperties": { | ||
| "description": "The HDInsight cluster application GET response.", | ||
| "type": "object", | ||
| "properties": { | ||
|
|
@@ -353,7 +327,7 @@ | |
| "errors": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "./cluster.json#/definitions/errors" | ||
| "$ref": "./cluster.json#/definitions/Errors" | ||
| }, | ||
| "description": "The list of errors." | ||
| }, | ||
|
|
@@ -394,7 +368,7 @@ | |
| } | ||
| }, | ||
| "properties": { | ||
| "$ref": "#/definitions/ApplicationGetProperties", | ||
| "$ref": "#/definitions/ApplicationProperties", | ||
| "description": "The properties of the application." | ||
| } | ||
| } | ||
|
|
@@ -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", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.