Skip to content

Commit

Permalink
Add free-form object spec for testing purpose.
Browse files Browse the repository at this point in the history
  • Loading branch information
raych1 committed Oct 25, 2019
1 parent 4ee9f31 commit b711d80
Show file tree
Hide file tree
Showing 2 changed files with 231 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"api-version": "2019-10-17-preview",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "my-resource-name"
},
"responses": {
"200": {
"body": {
"name": "my-resource-name",
"type": "microsoft.insights/workbooktemplate",
"location": "westus",
"resourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/microsoft.insights/workbooktemplates/my-resource-name",
"properties": {
"id": "1bc6ac57-4789-4b4b-84ed-2ed293ee98e7",
"priority": 1,
"author": "Contoso",
"galleries": [
{
"name": "Simple Template",
"category": "Failures",
"type": "tsg",
"resourceType": "microsoft.insights/components",
"order": 100
}
],
"templateData": {}
},
"tags": null
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
{
"swagger": "2.0",
"info": {
"title": "ApplicationInsightsManagementClient",
"description": "Azure Application Insights workbook template type.",
"version": "2019-10-17-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": {
"get": {
"description": "Get a single workbook template by its resourceName.",
"operationId": "WorkbookTemplates_Get",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/WorkbookTemplateResourceNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "A workbook template definition.",
"schema": {
"$ref": "#/definitions/BodyAsObject"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/WorkbookError"
}
}
},
"x-ms-examples": {
"WorkbookTemplateGet": {
"$ref": "./WorkbookTemplateGet.json"
}
}
}
}
},
"definitions": {
"Resource": {
"properties": {
"resourceId": {
"type": "string",
"readOnly": true,
"description": "Azure resource Id"
},
"name": {
"type": "string",
"readOnly": true,
"description": "Azure resource name."
},
"type": {
"type": "string",
"readOnly": true,
"description": "Azure resource type"
},
"location": {
"type": "string",
"description": "Resource location",
"x-ms-mutability": [
"create",
"read"
]
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
}
},
"required": [
"location"
],
"x-ms-azure-resource": true,
"description": "An azure resource object"
},
"BodyAsObject": {
"description": "Test obj.",
"type": "object",
"additionalProperties": true
},
"ErrorFieldContract": {
"properties": {
"code": {
"type": "string",
"description": "Property level error code."
},
"message": {
"type": "string",
"description": "Human-readable representation of property-level error."
},
"target": {
"type": "string",
"description": "Property name."
}
},
"description": "Error Field contract."
},
"WorkbookError": {
"properties": {
"code": {
"type": "string",
"description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response."
},
"message": {
"type": "string",
"description": "Human-readable representation of the error."
},
"details": {