Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixed comments on swagger structure
  • Loading branch information
asafst committed Dec 10, 2017
commit b0872da32a424f463686fecb13531a381207a1d5
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"description": "**Gets the baseline values for a specific metric**.",
"parameters": [
{
"$ref": "#/parameters/ResourceUriParameter"
"$ref": "#/parameters/ExtendedResourceUriParameter"
},
{
"$ref": "#/parameters/MetricNameParameter"
Expand Down Expand Up @@ -91,36 +91,36 @@
"properties": {
"timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
"aggregation": "Average",
"interval": "PT1H"
},
"timestamps": [
"2017-04-14T02:20:00Z",
"2017-04-14T03:20:00Z"
],
"baseline": [
{
"sensitivity": "Low",
"lowThresholds": [
30.0,
31.1
],
"highThresholds": [
90.3453,
91.3453
]
},
{
"sensitivity": "Medium",
"lowThresholds": [
50.0,
51.1
],
"highThresholds": [
70.3453,
71.3453
]
}
]
"interval": "PT1H",
"timestamps": [
"2017-04-14T02:20:00Z",
"2017-04-14T03:20:00Z"
],
"baseline": [
{
"sensitivity": "Low",
"lowThresholds": [
30.0,
31.1
],
"highThresholds": [
90.3453,
91.3453
]
},
{
"sensitivity": "Medium",
"lowThresholds": [
50.0,
51.1
],
"highThresholds": [
70.3453,
71.3453
]
}
]
}
}
}
}
Expand All @@ -147,24 +147,6 @@
},
"description": "The localizable string class."
},
"BaselineProperties": {
"properties": {
"timespan": {
"type": "string",
"description": "The timespan for which the data was retrieved. Its value consists of two datatimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested."
},
"interval": {
"type": "string",
"format": "duration",
"description": "The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made."
},
"aggregation": {
"type": "string",
"description": "The aggregation type of the metric."
}
},
"description": "The baseline properties class."
},
"BaselineMetadataValue": {
"properties": {
"name": {
Expand Down Expand Up @@ -197,20 +179,41 @@
"properties": {
"id": {
Copy link
Contributor

Choose a reason for hiding this comment

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

id, name and type properties should be marked as readonly: true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added readonly:true

"type": "string",
"readOnly": true,
"description": "the metric baseline Id."
},
"type": {
"type": "string",
"readOnly": true,
"description": "the resource type of the baseline resource."
},
"name": {
"$ref": "#/definitions/LocalizableString",
"readOnly": true,
"description": "the name and the display name of the metric, i.e. it is localizable string."
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/BaselineProperties",
"description": "the properties of the baseline."
}
},
"description": "The response to a baseline query."
},
"BaselineProperties": {
"properties": {
"timespan": {
"type": "string",
"description": "The timespan for which the data was retrieved. Its value consists of two datatimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested."
},
"interval": {
"type": "string",
"format": "duration",
"description": "The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made."
},
"aggregation": {
"type": "string",
"description": "The aggregation type of the metric."
},
"timestamps": {
Copy link
Contributor

Choose a reason for hiding this comment

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

timestamps, baseline, metadata should be under properties envelope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved them to properties

"type": "array",
Expand All @@ -235,15 +238,23 @@
},
"description": "the baseline metadata values."
}
},
"required": [ "id", "type", "name" ],
"description": "The response to a baseline query."
},
"description": "The baseline properties class."
},
"Baseline": {
"type": "object",
"properties": {
"sensitivity": {
Copy link
Contributor

Choose a reason for hiding this comment

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

enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, changed to enum

"type": "string",
"enum": [
"Low",
"Medium",
"High"
],
"x-ms-enum": {
"name": "AccountType",
"modelAsString": false
},
"description": "the sensitivity of the baseline."
},
"lowThresholds": {
Expand All @@ -270,12 +281,12 @@
}
},
"parameters": {
"ResourceUriParameter": {
"ExtendedResourceUriParameter": {
"name": "resourceUri",
"in": "path",
"required": true,
"type": "string",
"description": "The identifier of the resource.",
"description": "The identifier of the resource. It has the following structure: subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. For example: subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"description": "**Lists the baseline values for a resource**.",
"parameters": [
{
"$ref": "#/parameters/ResourceUriParameter"
"$ref": "#/parameters/ExtendedResourceUriParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -192,6 +192,15 @@
"properties": {
"sensitivity": {
"type": "string",
"enum": [
"Low",
"Medium",
"High"
],
"x-ms-enum": {
"name": "AccountType",
"modelAsString": false
},
"description": "the sensitivity of the baseline."
},
"lowThresholds": {
Expand All @@ -218,12 +227,12 @@
}
},
"parameters": {
"ResourceUriParameter": {
"ExtendedResourceUriParameter": {
"name": "resourceUri",
"in": "path",
"required": true,
"type": "string",
"description": "The identifier of the resource.",
"description": "The identifier of the resource. It has the following structure: subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. For example: subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"resourceUri": "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default",
"api-version": "2017-05-01-preview",
"api-version": "2017-11-01-preview",
"TimeSeriesInformation": {
"sensitivities": ["Low", "Medium"],
"values": [61.0, 62.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"aggregation": "Average",
"interval": "PT1H",
"sensitivities": "Low,Medium",
"api-version": "2017-11-01"
"api-version": "2017-11-01-preview"
},
"responses": {
"200": {
Expand All @@ -19,36 +19,36 @@
"properties": {
"timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
"aggregation": "Average",
"interval": "PT1H"
},
"timestamps": [
"2017-04-14T02:20:00Z",
"2017-04-14T03:20:00Z"
],
"baseline": [
{
"sensitivity": "Low",
"lowThresholds": [
30.0,
31.1
],
"highThresholds": [
90.3453,
91.3453
]
},
{
"sensitivity": "Medium",
"lowThresholds": [
50.0,
51.1
],
"highThresholds": [
70.3453,
71.3453
]
}
]
"interval": "PT1H",
"timestamps": [
"2017-04-14T02:20:00Z",
"2017-04-14T03:20:00Z"
],
"baseline": [
{
"sensitivity": "Low",
"lowThresholds": [
30.0,
31.1
],
"highThresholds": [
90.3453,
91.3453
]
},
{
"sensitivity": "Medium",
"lowThresholds": [
50.0,
51.1
],
"highThresholds": [
70.3453,
71.3453
]
}
]
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"aggregation": "Average",
"interval": "PT1H",
"resulttype": "metadata",
"api-version": "2017-11-01"
"api-version": "2017-11-01-preview"
},
"responses": {
"200": {
Expand All @@ -19,18 +19,18 @@
"properties": {
"timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
"aggregation": "Average",
"interval": "PT1H"
},
"metadata": [
{
"name": "CurrentTrainingState",
"value": "Trained"
},
{
"name": "SelectedModel",
"value": "AdjustedBoxplot"
}
]
"interval": "PT1H",
"metadata": [
{
"name": "CurrentTrainingState",
"value": "Trained"
},
{
"name": "SelectedModel",
"value": "AdjustedBoxplot"
}
]
}
}
}
}
Expand Down