Skip to content

Address the issues with the redis API spec/examples found by new validation#883

Merged
vishrutshah merged 1 commit intoAzure:masterfrom
TimLovellSmith:redis-example-fixes
Feb 17, 2017
Merged

Address the issues with the redis API spec/examples found by new validation#883
vishrutshah merged 1 commit intoAzure:masterfrom
TimLovellSmith:redis-example-fixes

Conversation

@TimLovellSmith
Copy link
Copy Markdown
Member

@TimLovellSmith TimLovellSmith commented Jan 26, 2017

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • [N/A] If applicable, the PR references the bug/issue that it fixes. - no bug for this issue yet
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

  • I have read the contribution guidelines.
  • My spec meets the review criteria:
    • The spec conforms to the Swagger 2.0 specification.
    • Validation errors from the Linter extension for VS Code have all been fixed for this spec. (Note: for large, previously checked in specs, there will likely be many errors shown. Please contact our team so we can set a timeframe for fixing these errors if your PR is not going to address them).
    • The spec follows the patterns described in the Swagger good patterns document unless the service API makes this impossible.

@TimLovellSmith
Copy link
Copy Markdown
Member Author

TimLovellSmith commented Jan 26, 2017

(note: pending agreement on whether exposing accessKeys this way is the best approach)

Copy link
Copy Markdown
Contributor

@vishrutshah vishrutshah left a comment

Choose a reason for hiding this comment

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

@TimLovellSmith I've reviewed the changes & left some minor comments.

There are some other errors, I've discovered apart from the changes you have made using AutoRest Linter but I am just going to list here for your reference. We'd strongly recommend fixing them as well for better SDK experiences.

WARNING: NonAppJsonTypeWarning - Media types other than 'application/json' has limited support
        Path: #/Consumes[2]
WARNING: NonAppJsonTypeWarning - Media types other than 'application/json' has limited support
        Path: #/Produces[2]
WARNING: UniqueResourcePaths - More than one resource path is not allowed in a single spec
        Path: #/Paths
WARNING: LongRunningResponseValidation - An operation with x-ms-long-running-operation extension must have a valid terminal success status code. 200 or 201 for Put/Patch. 200, 201 or 204 for Post. 200 or 204 or both for Delete.
        Path: #/Paths/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import/post/Extensions/x-ms-long-running-operation
WARNING: LongRunningResponseValidation - An operation with x-ms-long-running-operation extension must have a valid terminal success status code. 200 or 201 for Put/Patch. 200, 201 or 204 for Post. 200 or 204 or both for Delete.
        Path: #/Paths/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export/post/Extensions/x-ms-long-running-operation

Secondly, based on email thread regarding accessKeys I am going to wait on approval of this PR until we have talk/decision with @hovsepm.

Thanks!

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.

Do you really need this (Message) to be PascalCase?

Copy link
Copy Markdown
Member Author

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?

Copy link
Copy Markdown
Member Author

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.

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.

@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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Opened #935

Comment thread arm-redis/2016-04-01/swagger/redis.json Outdated
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.

Empty description.

Comment thread arm-redis/2016-04-01/swagger/redis.json Outdated
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.

Do you really need this (Message) to be PascalCase?

…dation.

Fix some linter errors from redis swagger, mainly around the redis Import/Export actions.
@TimLovellSmith
Copy link
Copy Markdown
Member Author

@vishrutshah any further changes required?

@vishrutshah
Copy link
Copy Markdown
Contributor

@TimLovellSmith Changes looks good to me.

@amarzavery If you have time to skim through, please skim or I can merge it by tomorrow :)

@TimLovellSmith
Copy link
Copy Markdown
Member Author

ping @amarzavery @vishrutshah Ready to take this one?

@amarzavery
Copy link
Copy Markdown
Contributor

looking at this PR right now

@amarzavery
Copy link
Copy Markdown
Contributor

LGTM

@AutorestCI
Copy link
Copy Markdown

@AutorestCI
Copy link
Copy Markdown

@AutorestCI
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants