forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add free-form object spec for testing purpose.
- Loading branch information
Showing
2 changed files
with
231 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...s/resource-manager/Microsoft.Insights/preview/2019-09-01-preview/WorkbookTemplateGet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} | ||
} |
197 changes: 197 additions & 0 deletions
197
...ghts/resource-manager/Microsoft.Insights/preview/2019-09-01-preview/testBodyAsObject.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ErrorFieldContract" | ||
}, | ||
"description": "The list of invalid fields send in request, in case of validation error." | ||
} | ||
}, | ||
"description": "Error message body that will indicate why the operation failed." | ||
} | ||
}, | ||
"parameters": { | ||
"WorkbookTemplateResourceNameParameter": { | ||
"name": "resourceName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the Application Insights component resource.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SubscriptionIdParameter": { | ||
"name": "subscriptionId", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The ID of the target subscription.", | ||
"minLength": 1 | ||
}, | ||
"ApiVersionParameter": { | ||
"name": "api-version", | ||
"in": "query", | ||
"required": true, | ||
"type": "string", | ||
"description": "The API version to use for this operation.", | ||
"minLength": 1 | ||
}, | ||
"ResourceGroupNameParameter": { | ||
"name": "resourceGroupName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource group. The name is case insensitive.", | ||
"pattern": "^[-\\w\\._\\(\\)]+$", | ||
"minLength": 1, | ||
"maxLength": 90, | ||
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} |