Skip to content

Fixes for code review comments from https://github.com/Azure/azure-rest-api-specs/pull/752#761

Merged
fearthecowboy merged 8 commits intoAzure:masterfrom
naveedaz:master
Jan 18, 2017
Merged

Fixes for code review comments from https://github.com/Azure/azure-rest-api-specs/pull/752#761
fearthecowboy merged 8 commits intoAzure:masterfrom
naveedaz:master

Conversation

@naveedaz
Copy link
Copy Markdown
Contributor

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

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

"state"
],
"type": "object",
"properties": {
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.

@naveedaz: General comment: Since webapp has a big surface area for their APIs, there are lot of objects. It is hard for us to cover all the objects manually. It would be nice if the individual service teams would diligently mark the model properties as required or provide default values or mark them readOnly wherever necessary. The intent of the initial code review was to get this message across.
What are the required properties of the "Contact" object? Currently everything is optional. It is hard to believe that everything is optional. The service would definitely want some required properties in the "Contact" model
These are the following properties:

"properties": {
  "addressMailing": {
   "$ref": "#/definitions/Address",
   "description": "Mailing address."
  },
  "email": {
   "description": "Email address.",
   "type": "string"
  },
  "fax": {
   "description": "Fax number.",
   "type": "string"
  },
  "jobTitle": {
   "description": "Job title.",
   "type": "string"
  },
  "nameFirst": {
   "description": "First name.",
   "type": "string"
  },
  "nameLast": {
   "description": "Last name.",
   "type": "string"
  },
  "nameMiddle": {
   "description": "Middle name.",
   "type": "string"
  },
  "organization": {
   "description": "Organization.",
   "type": "string"
  },
  "phone": {
   "description": "Phone number.",
   "type": "string"
  }
}

},
"advancedRoutingEnabled": {
"type": "boolean"
},
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.

@naveedaz - missing description.

},
"advancedRoutingEnabled": {
"description": "Advanced routing enabled",
"type": "boolean"
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.

Can the description be more sensible? What does advanced routing mean?

"createdTime": {
"format": "date-time",
"description": "Domain creation timestamp.",
"type": "string",
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.

Why is this removed?

@fearthecowboy
Copy link
Copy Markdown
Contributor

  "pattern": "^[-\\\\w\\\\._\\\\(\\\\)]+[^\\\\.]$"

We believe this is over-escaped.

The intent would be to be left with
^[-\w._()]+[^\.]$

which means the literal in JSON should be

^[-\w\._\(\)]+[^\\.]$


Refers to: arm-web/2016-03-01/DeletedWebApps.json:1078 in c26c550. [](commit_id = c26c550, deletion_comment = False)

@fearthecowboy
Copy link
Copy Markdown
Contributor

  "description": "Custom action to be executed\r\n            when an auto heal rule is triggered.",

Still seeing some \r in descriptions.


Refers to: arm-web/2016-03-01/DeletedWebApps.json:121 in c26c550. [](commit_id = c26c550, deletion_comment = False)

@fearthecowboy
Copy link
Copy Markdown
Contributor

  "description": "Custom action to be executed\r\n            when an auto heal rule is triggered.",

and collapse extra spaces to single space.


Refers to: arm-web/2016-03-01/DeletedWebApps.json:121 in c26c550. [](commit_id = c26c550, deletion_comment = False)

},
"privateBytesInKB": {
"format": "int32",
"description": "A rule based on private bytes.",
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.

"format": "int32", [](start = 10, length = 18)

Why did this get removed? This should still be there.

"properties": {
"deletedTimestamp": {
"format": "date-time",
"description": "Time when the app was deleted.",
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.

"format": "date-time", [](start = 14, length = 22)

This shouldn't have been removed. Generation problem?

"deletedTimestamp": {
"format": "date-time",
"description": "Time when the app was deleted.",
"type": "string",
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.

"Time when the app was delete [](start = 29, length = 29)

Time zone? UTC?

@fearthecowboy
Copy link
Copy Markdown
Contributor

          "description": "Current state of the app. Read-only.",

Saying this in the description is not advised. In Some languages this isn't even correct in the generated code.


Refers to: arm-web/2016-03-01/DeletedWebApps.json:256 in c26c550. [](commit_id = c26c550, deletion_comment = False)

@fearthecowboy
Copy link
Copy Markdown
Contributor

          "description": "Hostnames associated with the app. Read-only.",

See above.


Refers to: arm-web/2016-03-01/DeletedWebApps.json:261 in c26c550. [](commit_id = c26c550, deletion_comment = False)

@fearthecowboy
Copy link
Copy Markdown
Contributor

          "description": "Name of the repository site. Read-only.",

See above. (and below!) :D


Refers to: arm-web/2016-03-01/DeletedWebApps.json:269 in c26c550. [](commit_id = c26c550, deletion_comment = False)

},
"lastModifiedTimeUtc": {
"format": "date-time",
"description": "Last time the app was modified, in UTC. Read-only.",
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.

"date-time" [](start = 24, length = 11)

Lost format again. :(

@fearthecowboy
Copy link
Copy Markdown
Contributor

      "description": "Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint.",

Please remove "Gets or sets" from descriptions - the language generator will make appropriate text regarding property accessors.


Refers to: arm-web/2016-03-01/DeletedWebApps.json:602 in c26c550. [](commit_id = c26c550, deletion_comment = False)

},
"reroutePercentage": {
"format": "double",
"description": "Percentage of the traffic which will be redirected to <code>ActionHostName</code>.",
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.

rmat": "double", [](start = 13, length = 16)

more lost formats!

Copy link
Copy Markdown
Contributor

@fearthecowboy fearthecowboy left a comment

Choose a reason for hiding this comment

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

Hey @naveedaz We've done a cursory run over a couple files; we're seeing a few issues with missing format and a couple other things. Could you fix them up and re-generate and push a new set of files?

Thanks!

@fearthecowboy fearthecowboy added the Reviewed-ChangesRequested <valid label in PR review process>add this label when assignee request changes after review label Nov 30, 2016
@yugangw-msft
Copy link
Copy Markdown
Contributor

Please port the support to create linux plan, particularly this commit
/cc: @LukaszStem

@yugangw-msft
Copy link
Copy Markdown
Contributor

yugangw-msft commented Dec 5, 2016

Also it appears we still have property names using serverFarm, like here

@naveedaz
Copy link
Copy Markdown
Contributor Author

naveedaz commented Dec 6, 2016

@yugangw-msft Changing the property serverFarmId will break a lot of things. The resources in ARM themselves are serverfarms. Is this really needed right now?

@yugangw-msft
Copy link
Copy Markdown
Contributor

@yugangw-msft Changing the property serverFarmId will break a lot of things. The resources in ARM themselves are serverfarms. Is this really needed right now?

@naveedaz Not critical, you can do it later

@amarzavery
Copy link
Copy Markdown
Contributor

@naveedaz - We ran the semantic validator and found some issues. Can you please resolve them

  • TopLevelDomains.json has a global parameter named "resourceGroupNameParameter" but it is not being used anywhere. Can you please remove it?

Semantically validating https://raw.githubusercontent.com/naveedaz/azure-rest-api-specs/master/arm-web/2015-04-01/TopLevelDomains.json:

Warnings

[ { code: 'UNUSED_PARAMETER',
message: 'Parameter is defined but is not used: #/parameters/resourceGroupNameParameter',
path: [ 'parameters', 'resourceGroupNameParameter' ] } ]

  • Recommendations.json has an unused model definition "Resource". Can you please remove it from that spec?

Semantically validating https://raw.githubusercontent.com/naveedaz/azure-rest-api-specs/master/arm-web/2016-03-01/Recommendations.json:

Warnings

[ { code: 'UNUSED_DEFINITION',
message: 'Definition is defined but is not used: #/definitions/Resource',
path: [ 'definitions', 'Resource' ] } ]

@fearthecowboy
Copy link
Copy Markdown
Contributor

@naveedaz if you can correct the issue brought up by @amarzavery , we're prepared to merge this PR; and then we can move you on to creating SDK and Unit Tests.

Copy link
Copy Markdown
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.

@@ -10324,9 +9947,6 @@
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
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.

Server returns 200 as well. Same for stop(), restart(), startSlot(), restartSot(), stopSlot().

@fearthecowboy
Copy link
Copy Markdown
Contributor

@jianghaolu Are the changes you requested completed?

@jianghaolu
Copy link
Copy Markdown
Contributor

No. The 2 fixes I'm still waiting are:

  1. scmType should be read-write
  2. start(), stop(), restart(), startSlot(), restartSot(), stopSlot() should accept 200

@jianghaolu
Copy link
Copy Markdown
Contributor

Another fix required:
CertitificateDetails shouldn't have an extra layer of properties.

@naveedaz
Copy link
Copy Markdown
Contributor Author

I have made the changes requested by @jianghaolu. Thanks

@jianghaolu
Copy link
Copy Markdown
Contributor

Thanks Navy, do you know about why CertificateDetails's definition here is different from the actual payload I received from server?

@jianghaolu
Copy link
Copy Markdown
Contributor

Looks like the issue for CertificateDetails is fixed.

@naveedaz
Copy link
Copy Markdown
Contributor Author

Can we get this merged please?

@fearthecowboy fearthecowboy merged commit fa45501 into Azure:master Jan 18, 2017
@AutorestCI
Copy link
Copy Markdown

No modification for NodeJS

@AutorestCI
Copy link
Copy Markdown

No modification for Python

@AutorestCI
Copy link
Copy Markdown

No modification for Ruby

veronicagg pushed a commit that referenced this pull request Jan 25, 2017
…es for SCMType. (#878)

* Make resourcegroup the first parameter if applicable.
* Address CR comments from #761
* Fix HTTP status codes for start/stop/restart app and deployment slots. Make SCM type read/write. Add Linux App Fx version.
* Rename operation parameters with name options to avoid conflict with Node CLI SDK. Add config snapshots API. Add valid values for SCMType.
* Remove obsolete siteAuthSettings properties
yugangw-msft pushed a commit that referenced this pull request Feb 11, 2017
…s API (#925)

* Fixes for code review comments

* Make resourcegroup the first parameter if applicable.

* Address CR comments from #761

* Address more comments on PR

* Fix HTTP status codes for start/stop/restart app and deployment slots. Make SCM type read/write. Add Linux App Fx version.

* Rename operation parameters with name options to avoid conflict with Node CLI SDK. Add config snapshots API. Add valid values for SCMType.

* Fix CR recommendations. Remove obsolete siteAuthSettings properties

* Surface the correct publishing user API

* Expose hosttype for hostnames

* Fix folder structure according to convention

* Fix paths in composite swagger json

* CR comment fix: Changed parameter name to userDetails.
romahamu pushed a commit to romahamu/azure-rest-api-specs that referenced this pull request Aug 26, 2019
change cache listing and skus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed-ChangesRequested <valid label in PR review process>add this label when assignee request changes after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants