Skip to content

Comments

Update failover group spec.#1106

Merged
dsgouda merged 4 commits intoAzure:masterfrom
jaredmoo:failovergroupgen
Apr 14, 2017
Merged

Update failover group spec.#1106
dsgouda merged 4 commits intoAzure:masterfrom
jaredmoo:failovergroupgen

Conversation

@jaredmoo
Copy link
Contributor

@jaredmoo jaredmoo commented Apr 10, 2017

Functional differences:

  • FailoverGroupResource -> FailoverGroup
  • FailoverGroupResourceList -> FailoverGroupListResult
  • Defined mutability for properties
  • Defined pageability for list operation
  • Added 202 response codes to long running operations

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

Functional differences:
- FailoverGroupResource -> FailoverGroup
- FailoverGroupResourceList -> FailoverGroupListResult
- Defined mutability for properties
- Defined pageability for list operation
- Added 202 response codes to long running operations
@jaredmoo
Copy link
Contributor Author

@btasdoven

Copy link
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

Added comments

"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maintain a consistent parameter ordering, either place ApiVersion and SubscriptionId together at the beginning of the parameters section or at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Consistent with what? This is both consistent within this file and consistent with the order that the parameters appear in the URI.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consistent with newer specs we are introducing in the repo which we are making sure adhere to this convention. We're in the process of writing a validation rule to that effect.
Simply put we want to ensure that the parameter section has path parameters first followed by body parameters and the client-level parameters (api-version and subscriptionId) in the beginning or at the end of the parameters section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, this is doable. Do you have a discussion I can link to as justification in my Swagger generator source code?

Copy link
Contributor

Choose a reason for hiding this comment

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

The closest discussion is this though we haven't articulated the details yet. Hope this helps

},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maintain a consistent parameter ordering, either place ApiVersion and SubscriptionId together at the beginning of the parameters section or at the end.

},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maintain a consistent parameter ordering, either place ApiVersion and SubscriptionId together at the beginning of the parameters section or at the end.

},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maintain a consistent parameter ordering, either place ApiVersion and SubscriptionId together at the beginning of the parameters section or at the end.

],
"description": "Sets which server is primary by failing over from the current primary server.",
"description": "Fails over from the current primary server to this server.",
"operationId": "FailoverGroups_Failover",
Copy link
Contributor

@dsgouda dsgouda Apr 10, 2017

Choose a reason for hiding this comment

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

nit: operationId should be of the noun_verb form do consider changing this but keep in mind that would be a breaking change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Fail over" is a verb :)

},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maintain a consistent parameter ordering, either place ApiVersion and SubscriptionId together at the beginning of the parameters section or at the end.

"x-ms-parameter-location": "method"
},
"ServerParameter": {
"ServerNameParameter": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't used anywhere. Either refer it from the appropriate operation parameters or delete it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will soon be merging sql swagger files into a single file in order to move away from composite swagger, so this parameter will be used by other operations in that combined file. Do you mind if we keep this standard parameter for now?

},
"FailoverGroupParameter": {
"name": "failoverGroupName",
"DatabaseNameParameter": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't used anywhere. Either refer it from the appropriate operation parameters or delete it

@dsgouda
Copy link
Contributor

dsgouda commented Apr 11, 2017

Would also like to point out that this would be a breaking change (since the method signatures are being modified)

Following order specified in Azure#1611
@jaredmoo
Copy link
Contributor Author

Understood there are client breaking changes. Not a major problem since clients haven't been published since this spec was first checked in. Thanks :)

@dsgouda
Copy link
Contributor

dsgouda commented Apr 11, 2017

LGTM pending CI builds

@jaredmoo
Copy link
Contributor Author

Thank you very much for the quick response time @dsgouda !

@dsgouda
Copy link
Contributor

dsgouda commented Apr 12, 2017

@azuresdkci Test this please

"name": "resourceGroupName",
"in": "path",
"description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.",
"description": "The name of the resource group that contains the resource.",
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the description here does not match with other specs under the same composite swagger, either revert this to the older description or update all the descriptions under the composite swagger to match this. It would break builds otherwise.
The problem here is that when we merge the documents into a single model, its common nodes should be exactly the same, it would be difficult to say which one overrides all other nodes.
A similar issue was filed here

@dsgouda dsgouda merged commit 85e1845 into Azure:master Apr 14, 2017
@AutorestCI
Copy link

No modification for NodeJS

@AutorestCI
Copy link

@AutorestCI
Copy link

@jaredmoo
Copy link
Contributor Author

Thanks @dsgouda !! 👍

@jaredmoo jaredmoo deleted the failovergroupgen branch July 8, 2017 17:22
mccleanp pushed a commit that referenced this pull request Mar 23, 2022
* Telephonyservices RP

* Update examples

* Updated listby examples responses

* fix go path

* fix go sdk readme
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