Skip to content

Commit

Permalink
Add CognitiveServices test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Schulte committed May 25, 2016
1 parent 40748df commit 18c6a84
Show file tree
Hide file tree
Showing 4 changed files with 894 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public static void Cdn_2016_04_02()
RunSwaggerTest("CDN", "2016-04-02", "cdn.json");
}

[Fact]
public static void CognitiveServices_2016_02_01_preview()
{
RunSwaggerTest("CognitiveServices", "2016-02-01-preview", "cognitiveservices.json");
}

[Fact]
public static void Compute_2015_06_15()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<Content Include="Expected\Network\2015-06-15\Microsoft.Network.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Expected\CognitiveServices\2016-02-01-preview\Microsoft.CognitiveServices.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="packages.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -171,6 +174,9 @@
<Content Include="Swagger\Network\2016-03-30\network.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Swagger\CognitiveServices\2016-02-01-preview\cognitiveservices.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Modelers\Swagger.Tests\AutoRest.Modeler.Swagger.Tests.csproj">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"id": "http://schema.management.azure.com/schemas/2016-02-01-preview/Microsoft.CognitiveServices.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Microsoft.CognitiveServices",
"description": "Microsoft CognitiveServices Resource Types",
"resourceDefinitions": {
"accounts": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Microsoft.CognitiveServices/accounts"
]
},
"apiVersion": {
"type": "string",
"enum": [
"2016-02-01-preview"
]
},
"sku": {
"oneOf": [
{
"$ref": "#/definitions/Sku"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
},
"kind": {
"oneOf": [
{
"type": "string",
"enum": [
"ComputerVision",
"Emotion",
"Face",
"LUIS",
"Recommendations",
"Speech",
"TextAnalytics",
"WebLM"
]
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Required. Indicates the type of cognitive service account. Possible values include: 'ComputerVision', 'Emotion', 'Face', 'LUIS', 'Recommendations', 'Speech', 'TextAnalytics', 'WebLM'"
},
"location": {
"type": "string",
"description": "Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update the request will succeed."
},
"tags": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters."
},
"properties": {
"oneOf": [
{
"type": "object"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Must exist in the request. Must not be null."
}
},
"required": [
"type",
"apiVersion",
"sku",
"kind",
"location",
"properties"
],
"description": "Microsoft.CognitiveServices/accounts"
}
},
"definitions": {
"Sku": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{
"type": "string",
"enum": [
"F0",
"S0",
"S1",
"S2",
"S3",
"S4"
]
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Gets or sets the sku name. Required for account creation, optional for update. Possible values include: 'F0', 'S0', 'S1', 'S2', 'S3', 'S4'"
}
},
"required": [
"name"
],
"description": "The SKU of the cognitive services account."
}
}
}

0 comments on commit 18c6a84

Please sign in to comment.