Skip to content

Conversation

@felixwa
Copy link
Contributor

@felixwa felixwa commented May 12, 2017

  1. Changes type of skuName property from Sku to SkuName.
  2. Marks some fields as required.

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

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.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger


This change is Reviewable

1. Changes type of skuName property from Sku to SkuName.
2. Marks some fields as required.
@jianghaolu
Copy link
Contributor

error: Found errors in validating the response with statusCode "200" for example in spec for operation "CognitiveServicesAccounts_GetProperties".:

{ code: 'RESPONSE_VALIDATION_ERROR',
  message: 'Found errors in validating the response with statusCode "200" for example in spec for operation "CognitiveServicesAccounts_GetProperties".',
  innerErrors: 
   [ { code: 'INVALID_RESPONSE_BODY',
       errors: 
        [ { code: 'INVALID_TYPE',
            params: [ 'object', 'string' ],
            message: 'Expected type object but found type string',
            path: [],
            description: 'Cognitive Services Account is an Azure resource representing the provisioned account, its type, location and SKU.' } ],
       message: 'Invalid body: Expected type object but found type string',
       path: [] } ] }

@jianghaolu
Copy link
Contributor

error: Found errors in validating the response with statusCode "200" for x-ms-example "Check SKU Availability" in operation "CheckSkuAvailability_List".:

{ code: 'RESPONSE_VALIDATION_ERROR',
 message: 'Found errors in validating the response with statusCode "200" for x-ms-example "Check SKU Availability" in operation "CheckSkuAvailability_List".',
 innerErrors: 
  [ { code: 'INVALID_RESPONSE_BODY',
      errors: 
       [ { code: 'INVALID_TYPE',
           params: [ 'string', 'null' ],
           message: 'Expected type string but found type null',
           path: [ 'value', '0', 'message' ],
           description: 'Additional error message.' },
         { code: 'INVALID_TYPE',
           params: [ 'string', 'null' ],
           message: 'Expected type string but found type null',
           path: [ 'value', '0', 'reason' ],
           description: 'Reason why the SKU is not available.' } ],
      message: 'Invalid body: Value failed JSON Schema validation',
      path: [] } ] }

Copy link
Contributor

@jianghaolu jianghaolu left a comment

Choose a reason for hiding this comment

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

Please fix the examples after the payload definition for Sku is changed.

@felixwa
Copy link
Contributor Author

felixwa commented May 15, 2017

@jianghaolu ,
For issue 1: I cannot get it when run "node cli validate-example". What tool did you use?
For issue 2: it is a known issue, the field can be a string or null. I have consulted this issue with reviewer last time and she said this is a known issue. PR: #1090 Issue: #798

@jianghaolu
Copy link
Contributor

Seems like both are false alarms. Otherwise looks good to me.

@jianghaolu jianghaolu merged commit 20b02b6 into Azure:master May 15, 2017
@AutorestCI
Copy link

No modification for Ruby

@AutorestCI
Copy link

No modification for NodeJS

@AutorestCI
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants