-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Address the issues with the redis API spec/examples found by new validation #883
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
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
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
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 |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "Message": "reboot operation enqueued" | ||
| } | ||
| } | ||
| } | ||
|
|
||
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
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 |
|---|---|---|
|
|
@@ -10,12 +10,10 @@ | |
| "https" | ||
| ], | ||
| "consumes": [ | ||
| "application/json", | ||
| "text/json" | ||
| "application/json" | ||
| ], | ||
| "produces": [ | ||
| "application/json", | ||
| "text/json" | ||
| "application/json" | ||
| ], | ||
| "security": [ | ||
| { | ||
|
|
@@ -80,13 +78,13 @@ | |
| ], | ||
| "responses": { | ||
| "201": { | ||
| "description": "", | ||
| "description": "The new redis cache was successfully created. Check provisioningStatus to see detailed status.", | ||
| "schema": { | ||
| "$ref": "#/definitions/RedisResource" | ||
| } | ||
| }, | ||
| "200": { | ||
| "description": "", | ||
| "description": "The existing redis cache was successfully updated. Check provisioningStatus to see detailed status.", | ||
| "schema": { | ||
| "$ref": "#/definitions/RedisResource" | ||
| } | ||
|
|
@@ -429,10 +427,10 @@ | |
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "" | ||
| }, | ||
| "204": { | ||
| "description": "" | ||
| "description": "Reboot operation successfully enqueued", | ||
| "schema": { | ||
| "$ref": "#/definitions/RedisForceRebootResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -481,7 +479,13 @@ | |
| ], | ||
| "responses": { | ||
| "202": { | ||
| "description": "" | ||
| "description": "Import operation successfully enqueued; follow the Location header to poll for final outcome." | ||
| }, | ||
| "200": { | ||
| "description": "Import operation succeeded." | ||
| }, | ||
| "204": { | ||
| "description": "Import operation succeeded." | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -530,7 +534,13 @@ | |
| ], | ||
| "responses": { | ||
| "202": { | ||
| "description": "" | ||
| "description": "Export operation successfully enqueued; follow the Location header to poll for final outcome." | ||
| }, | ||
| "200": { | ||
| "description": "Export operation succeeded." | ||
| }, | ||
| "204": { | ||
| "description": "Export operation succeeded." | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -578,7 +588,13 @@ | |
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "", | ||
| "description": "The patch schedule was successfully updated.", | ||
| "schema": { | ||
| "$ref": "#/definitions/RedisPatchSchedule" | ||
| } | ||
| }, | ||
| "201": { | ||
| "description": "The patch schedule was successfully created.", | ||
| "schema": { | ||
| "$ref": "#/definitions/RedisPatchSchedule" | ||
| } | ||
|
|
@@ -662,9 +678,6 @@ | |
| "schema": { | ||
| "$ref": "#/definitions/RedisPatchSchedule" | ||
| } | ||
| }, | ||
| "404": { | ||
| "description": "Response of get patch schedules if it does not exist." | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -898,6 +911,11 @@ | |
| "type": "integer", | ||
| "format": "int32", | ||
| "description": "Redis SSL port." | ||
| }, | ||
| "accessKeys": { | ||
| "$ref": "#/definitions/RedisAccessKeys", | ||
| "readOnly": true, | ||
| "description": "The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache" | ||
| } | ||
| }, | ||
| "allOf": [ | ||
|
|
@@ -1109,6 +1127,16 @@ | |
| "properties" | ||
| ], | ||
| "description": "Response to put/get patch schedules for Redis cache." | ||
| }, | ||
| "RedisForceRebootResponse": { | ||
| "properties": { | ||
| "Message": { | ||
|
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. Do you really need this ( |
||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "Status message" | ||
| } | ||
| }, | ||
| "description": "Response to force reboot for Redis cache." | ||
| } | ||
| }, | ||
| "parameters": { | ||
|
|
||
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.
Do you really need this (
Message) to be PascalCase?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.
I added this in the example due to an unfortunate fact that it is returning pascal case on the wire today.
We did not formally document this member before the exercise with examples. In fact when we reviewed this REST API we did not document any response body. Perhaps the best thing to do here is document the API as returning an empty response, and treat the fact that RP returns a Message property as a bug?
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.
@vishrutshah my take, revised: it should never have been PascalCase but now that it is, it can't be fixed without it being breaking, so its stuck that way til next api-version.
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.
@TimLovellSmith I understand your concerns and makes sense to wait until next api-version. It's be great if you could please open and issue on that here and from your side as well, we do not miss this on next api-version.
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.
Opened #935