Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new field to SignalR Resource property #5661

Merged
merged 3 commits into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
"capacity": 1
},
"properties": {
"hostNamePrefix": null
"hostNamePrefix": null,
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
}
},
"api-version": "2018-10-01",
Expand All @@ -31,11 +38,18 @@
"properties": {
"provisioningState": "Succeeded",
"externalIP": "10.0.0.1",
"hostName": "myservice.service.signalr.net",
"hostName": "mysignalrservice.service.signalr.net",
"publicPort": 443,
"serverPort": 443,
"version": "1.0-preview",
"hostNamePrefix": null
"version": "1.0",
"hostNamePrefix": null,
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
},
"location": "eastus",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@
"properties": {
"provisioningState": "Succeeded",
"externalIP": "10.0.0.1",
"hostName": "myservice.service.signalr.net",
"hostName": "mysignalrservice.service.signalr.net",
"publicPort": 443,
"serverPort": 443,
"version": "1.0-preview",
"hostNamePrefix": null
"version": "1.0",
"hostNamePrefix": null,
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
},
"location": "eastus",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@
"properties": {
"provisioningState": "Succeeded",
"externalIP": "10.0.0.1",
"hostName": "myservice.service.signalr.net",
"hostName": "mysignalrservice.service.signalr.net",
"publicPort": 443,
"serverPort": 443,
"version": "1.0-preview",
"hostNamePrefix": null
"version": "1.0",
"hostNamePrefix": null,
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
},
"location": "eastus",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@
"properties": {
"provisioningState": "Succeeded",
"externalIP": "10.0.0.1",
"hostName": "myservice.service.signalr.net",
"hostName": "mysignalrservice.service.signalr.net",
"publicPort": 443,
"serverPort": 443,
"version": "1.0-preview",
"hostNamePrefix": null
"version": "1.0",
"hostNamePrefix": null,
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
},
"location": "eastus",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
"capacity": 1
},
"properties": {
"hostNamePrefix": null
"hostNamePrefix": null,
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
}
},
"api-version": "2018-10-01",
Expand All @@ -30,11 +37,18 @@
"properties": {
"provisioningState": "Succeeded",
"externalIP": "10.0.0.1",
"hostName": "myservice.service.signalr.net",
"hostName": "mysignalrservice.service.signalr.net",
"publicPort": 443,
"serverPort": 443,
"version": "1.0-preview",
"hostNamePrefix": null
"version": "1.0",
"hostNamePrefix": null,
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
},
"location": "eastus",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"SignalR_RegenerateKey": {
"$ref": "./examples/SignalR_RegenerateKey.json"
Expand Down Expand Up @@ -319,6 +322,9 @@
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
Copy link
Member

Choose a reason for hiding this comment

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

@juniwang any reason you are adding this to PUT operations? I was under the impression that this is only for POST.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Telling from this doc: When x-ms-long-running-operation is specified, there should also be a x-ms-long-running-operation-options specified..

Will remove 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.

Removed

},
"x-ms-examples": {
"SignalR_CreateOrUpdate": {
"$ref": "./examples/SignalR_CreateOrUpdate.json"
Expand Down Expand Up @@ -354,6 +360,9 @@
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
Copy link
Member

Choose a reason for hiding this comment

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

@juniwang same as above, why specify for delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

},
"x-ms-examples": {
"SignalR_Delete": {
"$ref": "./examples/SignalR_Delete.json"
Expand Down Expand Up @@ -401,6 +410,9 @@
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"SignalR_Update": {
"$ref": "./examples/SignalR_Update.json"
Expand Down Expand Up @@ -438,6 +450,9 @@
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"SignalR_Restart": {
"$ref": "./examples/SignalR_Restart.json"
Expand Down Expand Up @@ -777,18 +792,18 @@
"x-ms-azure-resource": true
},
"ResourceSku": {
"description": "The billing information of the resource.(e.g. basic vs. standard)",
"description": "The billing information of the SignalR resource.",
"required": [
"name"
],
"type": "object",
"properties": {
"name": {
"description": "The name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified)",
"description": "The name of the SKU. Required.\r\n\r\nAllowed values: Standard_S1, Free_F1",
"type": "string"
},
"tier": {
"description": "Optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead.",
"description": "Optional tier of this particular SKU. 'Standard' or 'Free'. \r\n\r\n`Basic` is deprecated, use `Standard` instead.",
"enum": [
"Free",
"Basic",
Expand All @@ -802,16 +817,16 @@
}
},
"size": {
"description": "Optional, string. When the name field is the combination of tier and some other value, this would be the standalone code.",
"description": "Optional string. For future use.",
"type": "string"
},
"family": {
"description": "Optional, string. If the service has different generations of hardware, for the same SKU, then that can be captured here.",
"description": "Optional string. For future use.",
"type": "string"
},
"capacity": {
"format": "int32",
"description": "Optional, integer. If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not \r\npossible for the resource this may be omitted.",
"description": "Optional, integer. The unit count of SignalR resource. 1 by default.\r\n\r\nIf present, following values are allowed:\r\n Free: 1\r\n Standard: 1,2,5,10,20,50,100",
"type": "integer"
}
}
Expand Down Expand Up @@ -880,6 +895,48 @@
"hostNamePrefix": {
"description": "Prefix for the hostName of the SignalR service. Retained for future use.\r\nThe hostname will be of format: <hostNamePrefix>.service.signalr.net.",
"type": "string"
},
"features": {
"description": "List of SignalR featureFlags. e.g. ServiceMode.\r\n\r\nFeatureFlags that are not included in the parameters for the update operation will not be modified.\r\nAnd the response will only include featureFlags that are explicitly set. \r\nWhen a featureFlag is not explicitly set, SignalR service will use its globally default value. \r\nBut keep in mind, the default value doesn't mean \"false\". It varies in terms of different FeatureFlags.",
"type": "array",
"items": {
"$ref": "#/definitions/SignalRFeature"
}
}
}
},
"SignalRFeature": {
"description": "Feature of a SignalR resource, which controls the SignalR runtime behavior.",
"required": [
"flag",
"value"
],
"type": "object",
"properties": {
"flag": {
"description": "Name of the feature. Required.",
Copy link
Contributor

Choose a reason for hiding this comment

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

The description is a bit confusing since there can only be a limited number of values. Type/kind of feature makes more sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any changes, not blocker though

"enum": [
"ServiceMode"
],
"type": "string",
"x-ms-enum": {
"name": "FeatureFlags",
"modelAsString": true
}
},
"value": {
"description": "Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values.",
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"properties": {
"description": "Optional properties related to this feature.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-ms-client-flatten": false
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This doesn't need to be set explicitly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed. This produces a warning:

WARNING (AvoidNestedProperties/R2001/SDKViolation): Consider using x-ms-client-flatten to provide a better end user experience
    - file:///mnt/d/workspace/github/juniwang/azure-rest-api-specs/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2018-10-01/signalr.json:924:8 ($.definitions.SignalRFeature.properties.properties)

If it doens't matter, we may suppress the warning in future.

Copy link
Contributor

@dsgouda dsgouda May 14, 2019

Choose a reason for hiding this comment

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

I see, we discourage too many levels of nesting especially on input parameters hence the warning. Please mark x-ms-client-flatten: true

}
}
},
Expand Down Expand Up @@ -1029,11 +1086,7 @@
"in": "query",
"description": "Client Api Version.",
"required": true,
"type": "string",
"enum": [
"2018-03-01-preview",
"2018-10-01"
]
"type": "string"
},
"SubscriptionIdParameter": {
"name": "subscriptionId",
Expand Down