Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Azure/autorest
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Schulte committed May 31, 2016
2 parents 9b84c45 + 78906b1 commit 9ade282
Show file tree
Hide file tree
Showing 86 changed files with 27,254 additions and 190 deletions.
1 change: 1 addition & 0 deletions AutoRest/AutoRest.Core/AutoRest.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
<file src="binaries/net45/AutoRest.Modeler.Swagger.dll" target="tools" />
<file src="binaries/net45/AutoRest.Modeler.CompositeSwagger.dll" target="tools" />
<file src="binaries/net45/Newtonsoft.Json.dll" target="tools" />
<file src="binaries/net45/YamlDotNet.dll" target="tools" />
</files>
</package>
4 changes: 4 additions & 0 deletions AutoRest/AutoRest.Core/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ public static void PopulateSettings(object entityToPopulate, IDictionary<string,
{
property.SetValue(entityToPopulate, true);
}
else if (property.PropertyType.IsEnum)
{
property.SetValue(entityToPopulate, Enum.Parse(property.PropertyType, setting.Value, true));
}
else
{
property.SetValue(entityToPopulate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ public static void Web()
RunSwaggerTest("Web", "2015-08-01", "web.json");
}

[Fact]
public static void WebYaml()
{
// same test as Web(), but converted to YAML
RunSwaggerTest("web.yaml", "Web");
}

private static void RunSwaggerTest(string resourceType, string apiVersion, string swaggerFileName)
{
SwaggerSpecHelper.RunTests<AzureResourceSchemaCodeGenerator>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
<Content Include="Swagger\DataLakeStore\2015-10-01-preview\account.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Swagger\web.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Modelers\Swagger.Tests\AutoRest.Modeler.Swagger.Tests.csproj">
Expand Down

0 comments on commit 9ade282

Please sign in to comment.