Skip to content

add service fabric swagger file#984

Merged
anudeepsharma merged 25 commits into
Azure:masterfrom
chingchenmsft:local_develop_servicefabricresourceprovider
Mar 17, 2017
Merged

add service fabric swagger file#984
anudeepsharma merged 25 commits into
Azure:masterfrom
chingchenmsft:local_develop_servicefabricresourceprovider

Conversation

@chingchenmsft
Copy link
Copy Markdown
Contributor

@chingchenmsft chingchenmsft commented Mar 3, 2017

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.

@msftclas
Copy link
Copy Markdown

msftclas commented Mar 3, 2017

@chingchenmsft,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

"tags": [
"ClusterpatchOperation"
],
"operationId": "ClusterOperation_Update",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The first part of the operation id (before _ ) should be a plural, also it is recommended to match this part with URL collection segment. If you apply both rules this can be named as "Clusters_Update"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Anu for your time, so the operation is against one cluster a time, should we still use "Clusters" not "Cluster"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@chingchenmsft The first part becomes the name of the generated container class for the operations, something like:

class Clusters {
  Cluster Get(..)
  Cluster Create(..)
  Cluster Update(..)
  List<Cluster> List()
  ..
}

This is one of the patterns we recommend to have consistently in naming across RPs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

okay

}
}
},
"ClusterResource": {
Copy link
Copy Markdown
Member

@anuchandy anuchandy Mar 3, 2017

Choose a reason for hiding this comment

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

Remove 'Resource' from the name, cluster is already a resource (allOf Resource).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

"tags": [
"ClusterGetOperation"
],
"operationId": "ClusterOperation_get",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ClusterOperation_get -> Clusters_Get

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

"tags": [
"ClusterCreateOperation"
],
"operationId": "ClusterOperation_Create",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ClusterOperation_Create -> Clusters_Create

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

}
}
},
"paasClusterUpgradePolicy": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p -> P

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

}
}
},
"diagnosticsStorageAccountConfig": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

make sure all model names are PascalCase. diagnosticsStorageAccountConfig -> DiagnosticsStorageAccountConfig

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

}
}
},
"clusterResourceProperties": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

PascalCase, clusterResourceProperties -> ClusterResourceProperties

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

"clusterId": {
"type": "string"
},
"clusterState": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ClusterState

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"clusterState" is a property name, should we make the first letter as lower case ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sorry, please disregard this comment

}
}
},
"paths": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does RP supports Listing resources (clusters) by subscription and resource group? if yes please add the same operations

Clusters_List -> Lists all of the clusters within an Azure subscription
Clusters_ListByResourceGroup -> Lists all the Clusters under a resource group.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does RP support deleting cluster? if so, please add the operation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will add

"$ref": "#/definitions/ErrorModel"
}
}
}
Copy link
Copy Markdown
Member

@anuchandy anuchandy Mar 3, 2017

Choose a reason for hiding this comment

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

Is this a long running operation (LRO)? if yes please mark it so using x-ms-long-running-operation https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-extensions.md#x-ms-long-running-operation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is not long running, all our API here are NOT long running API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same comment as above for create - (1) response model for 200 (2) removing 202

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i add it back, because we will make the operation as long running shortly

"schema": {
"$ref": "#/definitions/ErrorModel"
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is Create a long running operation (LRO)? if yes please mark it so using x-ms-long-running-operation https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-extensions.md#x-ms-long-running-operation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is not long running, all our API here are NOT long running API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, can we define response model for 200? I assume it is Cluster

          "200": {
            "description": "OK, Cluster successfully created.",
            "schema": {
              "$ref": "#/definitions/<ResponseModel>"
            }
          },

If create is not LRO then we can remove 202 right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i add it back, because we will make the operation as long running shortly

"properties": {
"$ref": "#/definitions/clusterResourceProperties"
}
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

By default, we flatten 'properties' by one level. Here in this case

ClusterResource: {
  "properties": {
    "firstProperty": {
       "type": "string"
    },
    "properties": {
     "$ref": "#/definitions/clusterResourceProperties"
    }
  }
}

The generated class will be used as:

ClusterResource rs;
rs.myProperty = "";
rs.properties.clusterId = "";

But if you apply x-ms-client-flatten extension https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-extensions.md#x-ms-client-flatten as below:

ClusterResource: {
  "properties": {
    "firstProperty": {
       "type": "string"
    },
    "properties": {
     "x-ms-client-flatten": true,
     "$ref": "#/definitions/clusterResourceProperties"
    }
  }
}

then generated type will be used as:

ClusterResource rs;
rs.myProperty = "";
rs.clusterId = "";

We recommend using this extension so that end users experience will be better. I guess this is one of the warning you are getting from validator.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, but we can't do this, because the existing contract from ARM define in this way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

as mentioned in the previous comment, This flattening is only applied to the generated type, each language specific runtime will ensure payload on the wire conforms to the contract.

Copy link
Copy Markdown
Member

@anuchandy anuchandy Mar 3, 2017

Choose a reason for hiding this comment

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

@amarzavery could you please chime in? My understanding is "x-ms-client-flatten" affects only the generated model but when the model is serialized the resulting json will contain nested "properties"
but @chingchenmsft mentioned this is not the case. When he tried .NET SDK generated from a swagger (with this extension applied) ARM failed the request.

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.

Yup the extension only applies to how the model will be presented in the sdk. It does not affect the wire contract.

There is one caveat for applying this extension: If the model is polymorphic then make sure that flattening does not cause issues.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks, yes you are right, i changed to use this flag, not sure why last time i failed to do this:)

"$ref": "#/definitions/clusterPatchParameters"
}
}
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you think we can provide a better name for the type ClusterPatchRequest ? with this name the prototype of the update method will looks like

class Clusters {
  Cluster Update(String resourceGroupName, String customerName, ClusterPatchRequest clusterPatchRequest);
}

How about re-naming ClusterPatchRequest to ClusterUpdateParameters ? and the nested ClusterPatchParameters can be named as ClusterPropertiesUpdateParameters. This name seems better match with the operation name (Clusters.Update).

In addition to this, we could apply x-ms-client-flatten extension https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-extensions.md#x-ms-client-flatten here as well for simple user experience (Ref: https://github.com/Azure/azure-rest-api-specs/pull/984/files#r104088396)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i have renamed it, but we can't flatten it, because doing that will fail our request, ARM doesn't allow do this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This flattening is only applied to the generated type, each language specific runtime will ensure payload on the wire looks as expected by RP.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Did not quite fellow, last time i tried to do this, and ARM failed my request, not sure what i have missed when generated .net SDK library.

"$ref": "#/definitions/ErrorModel"
}
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think "response code 202" and "default" are not applicable for List operation, Right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will remove

}
}
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same comment as above for "response code 202" and "default"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will remove.

"description": "Accepted",
"schema": {
"$ref": "#/definitions/Cluster"
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why 202 response for a GET?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed.

"responses": {
"200": {
"description": "OK"
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One of the required response code for DELETE is "204", which is missing.

As per PR guideline for DELETE: "The resource provider can return 200 (OK) or 204 (NoContent) to indicate that the operation completed successfully. A 200 (OK) should be returned if the object exists and was deleted successfully; and a 204 (NoContent) should be used if the resource does not exist and the request is well formed."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

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.

Copy link
Copy Markdown
Contributor Author

@chingchenmsft chingchenmsft left a comment

Choose a reason for hiding this comment

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

added example

"schema": {
"$ref": "#/definitions/ClusterUpdateParameters"
},
"description": "Patch Request"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we have a detailed description for e.g. "The parameters to provide for the updated cluster."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

}
},
"202": {
"description": "Accept"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

detailed description e.g. "Accepted - Update request accepted; the operation will complete asynchronously."

],
"responses": {
"200": {
"description": "OK",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

detailed description e.g. "OK - Cluster updated successfully"

"readOnly": true
},
"diagnosticsStorageAccountConfig": {
"$ref": "#/definitions/DiagnosticsStorageAccountConfig"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As per our offline discussion, this property 'diagnosticsStorageAccountConfig' is read-only. Can we mark as read-only here and remove read-only applied to individual properties in the model "definitions/DiagnosticsStorageAccountConfig"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

can be changed

"properties": {
"name": {
"type": "string",
"description": "name"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we have sufficient description for 'name' property?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

"type": "array",
"items": {
"$ref": "#/definitions/ClientCertificateThumbprint"
}
Copy link
Copy Markdown
Member

@anuchandy anuchandy Mar 7, 2017

Choose a reason for hiding this comment

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

Is 'clientCertificateThumbprints' settable through PUT/PATCH? or is it falls under properties that can be set only via template? checking if this is eligible to mark read-only

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

clientCertificateThumbprints is ok to be changed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suppose user wants to add a ClientCertificateThumbprint instance to this collection via PATCH, which one of the following flow is correct?

Flow1

  1. clusterPropertiesUpdateParameters = new ClusterPropertiesUpdateParameters();
  2. User gets the cluster instance
  3. set clusterPropertiesUpdateParameters.clientCertificateThumbprints = cluster.clientCertificateThumbprints;
  4. clusterPropertiesUpdateParameters.clientCertificateThumbprints.add(newClientCertificateThumbprint);
  5. PATCH clusterPropertiesUpdateParameters

Flow2:

  1. clusterPropertiesUpdateParameters = new ClusterPropertiesUpdateParameters();
  2. clusterPropertiesUpdateParameters.clientCertificateThumbprints.add(newClientCertificateThumbprint);
  3. PATCH clusterPropertiesUpdateParameters

Asking to confirm, incase of PATCH - whether sending an array with new items appends that to existing array in the server or it overwrites the previous collection.

It will be helpful to indicate this in the description, i.e. in general how the array needs to be PATCH-ed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it will overwrite.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will update

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for confirming.

"type": "array",
"items": {
"$ref": "#/definitions/ClientCertificateCommonName"
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

confirming - is 'clientCertificateCommonNames' eligible to mark as read-only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

clientCertificateCommonNames is ok to be changed.

"type": "array",
"items": {
"$ref": "#/definitions/SettingsSectionDescription"
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

confirming - is 'fabricSettings' eligible to mark as read-only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fabricSettings is ok to be changed,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Based on your previous comment, I think overwrite is the behavior for this array as well. If possible please provide a meaningful description for this property and indicate PATCH behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done, but this one (fabricSettings) is not be override.

}
},
"reverseProxyCertificate": {
"$ref": "#/definitions/CertificateDescription"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

confirming - is 'reverseProxyCertificate' eligible to mark as read-only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reverseProxyCertificate is ok to be changed, since it is just a setting in service fabric .

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same comment as above for description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

"$ref": "#/definitions/DiagnosticsStorageAccountConfig"
},
"upgradeDescription": {
"$ref": "#/definitions/PaasClusterUpgradePolicy"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

confirming - is upgradeDescription read-only ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

upgradeDescription is ok to be changed.

"api-version": "2016-09-01",
"ClusterResource": {
"properties": {
"clusterId": "4d0af3c4-04c4-4ea4-a7a0-5917aca0fe03",
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.

does not look like input.

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.

clusterId, clusterEndpoint, clusterCodeVersion, are these settable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

clusterCodeVersion yes, i will remove the other two.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

user can input, but we just ignore them for the other two.

}
}
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster",
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.

only location and tag are input there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed others.

Copy link
Copy Markdown
Contributor

@anudeepsharma anudeepsharma left a comment

Choose a reason for hiding this comment

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

Requesting changes.

"clusterEndpoint": {
"type": "string"
},
"clusterCodeVersion": {
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.

How user will know code version value, describe in description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

"$ref": "#/definitions/ClusterVersionDetails"
}
},
"clusterId": {
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.

missing description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

"name": "Security",
"parameters": [
{
"name": "ClusterProtectionLevel",
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.

I think name - value here should be enums, how user will know what values to send in.
These does not look like tags,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed.

"clientCertificateThumbprints": [],
"clientCertificateCommonNames": [],
"fabricSettings": [],
"managementEndpoint": "https://myCluster.southcentralus.cloudapp.azure.com:19080",
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.

Does not look like settable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

as offline chat, it can be changed.

"reverseProxyCertificate": {
"$ref": "#/definitions/CertificateDescription"
},
"managementEndpoint": {
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.

should be read only

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

offline chat, it can be changed.

"certificate": {},
"reliabilityLevel": "Silver",
"upgradeMode": "Automatic",
"clientCertificateThumbprints": [],
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 we need to send empty arrays

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed

"description": "Resource tags."
}
},
"required": [
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

are you looking at wrong place, this is the ARM "Resource": {} , i think location is the only required.

"Canceled"
]
},
"vmImage": {
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.

please add description for all the fields.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added.

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.

os = OS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

"vmInstanceCount": 5
}
],
"provisioningState": "Succeeded",
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.

ProvisioningState can't be updated by user.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed to read only

],
"provisioningState": "Succeeded",
"vmImage": "Windows",
"diagnosticsStorageAccountConfig": {
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.

is diagnostic settings required for resource?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes

"type": "boolean",
"description": "Is primary or not"
},
"vmInstanceCount": {
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.

Put description for all the fields.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

"name": "Security",
"parameters": [
{
"name": "ClusterProtectionLevel",
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 these parameters hold any string, or are these candidate for enum

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is string in our service.

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.

So I am assuming your service accepts any string for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, all are string for fabricSettings

"required": [
"managementEndpoint",
"reliabilityLevel",
"provisioningState",
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.

provisioningState can't be a required parameter. Why you will ask customer to provide this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed.

"description": "The provisioning state of the cluster",
"type": "string",
"enum": [
"Default",
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.

Creating is missing, what is meant by Default here, do you send default state out.

}
}
},
"DiagnosticsStorageAccountConfig": {
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.

If this is required, I am assuming, fields with in this is also required, like primaryAccessKey etc, in case properties in this class are not marked required, SDK will not validate the properties on client side and call will reach service just to be failed.

"description": "Certificate description",
"properties": {
"thumbprint": {
"type": "string"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Provide a description e.g. "hexadecimal string that uniquely identifies a certificate."

"type": "string"
},
"x509StoreName": {
"type": "string",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Provide a description r.g. "name of the X.509 certificate store"

"type": "string"
},
"thumbprintSecondary": {
"type": "string"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

description missing

}
},
"SettingsSectionDescription": {
"description": "Settings section description",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better description please - e.g. "Type representing a collection of settings applied to the fabric cluster"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

"properties": {
"name": {
"type": "string",
"description": "The name of settings section description"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better description - "unique name for the settings collection".

@chingchenmsft - fabricSettings is a collection of SettingsSectionDescription instances. Can we assume the name is unique?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

aedd

]
},
"applicationPorts": {
"description": "Application ports",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better description please - "The port (endpoint) range allocated for applications deployed in the cluster"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this is the range of public ports used by the deployed applications to listen for incoming traffic from the Internet, then please add that info to description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

"$ref": "#/definitions/EndpointRangeDescription"
},
"ephemeralPorts": {
"description": "Ephemeral ports",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we have better description here please? which clarifies the word Ephemeral

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

}
},
"EndpointRangeDescription": {
"description": "Endpoint range description",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

better description - "Type representing an endpoint range."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

"description": "Endpoint range description",
"properties": {
"startPort": {
"type": "integer"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

provide description

"type": "integer"
},
"endPort": {
"type": "integer"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

provide description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

@anudeepsharma anudeepsharma merged commit 13dee0c into Azure:master Mar 17, 2017
@AutorestCI
Copy link
Copy Markdown

No modification for Ruby

@AutorestCI
Copy link
Copy Markdown

No modification for NodeJS

@AutorestCI
Copy link
Copy Markdown

No modification for Python

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.

9 participants