change to use the nuget package
This commit is contained in:
parent
66126269ec
commit
82341b6664
|
@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.OData.Rea
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.OData.Reader.Tests", "test\Microsoft.OpenApi.OData.Reader.Tests\Microsoft.OpenApi.OData.Reader.Tests.csproj", "{90A98718-75EB-4E2B-A51E-66ACF66F15B4}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi", "tool\Microsoft.OpenApi\Microsoft.OpenApi.csproj", "{3C31B79A-776F-4199-899F-3DC7AA767003}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OoasUtil", "src\OoasUtil\OoasUtil.csproj", "{2D06C660-B550-432C-8062-D4070F7C371F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OoasGui", "src\OoasGui\OoasGui.csproj", "{79B190E8-EDB0-4C03-8FD8-EB48E4807CFB}"
|
||||
|
@ -27,10 +25,6 @@ Global
|
|||
{90A98718-75EB-4E2B-A51E-66ACF66F15B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{90A98718-75EB-4E2B-A51E-66ACF66F15B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{90A98718-75EB-4E2B-A51E-66ACF66F15B4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3C31B79A-776F-4199-899F-3DC7AA767003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3C31B79A-776F-4199-899F-3DC7AA767003}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3C31B79A-776F-4199-899F-3DC7AA767003}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C31B79A-776F-4199-899F-3DC7AA767003}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2D06C660-B550-432C-8062-D4070F7C371F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2D06C660-B550-432C-8062-D4070F7C371F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2D06C660-B550-432C-8062-D4070F7C371F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
|
@ -44,7 +44,14 @@ namespace Microsoft.OpenApi.OData.Generator
|
|||
|
||||
// The value of responses is a map of Response Objects.
|
||||
// It allows defining responses that can be reused across operations of the service.
|
||||
Responses = context.CreateResponses()
|
||||
Responses = context.CreateResponses(),
|
||||
|
||||
RequestBodies = null,
|
||||
Examples = null,
|
||||
SecuritySchemes = null,
|
||||
Links = null,
|
||||
Callbacks = null,
|
||||
Extensions = null
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.OData.Edm" Version="7.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\tool\Microsoft.OpenApi\Microsoft.OpenApi.csproj" />
|
||||
<PackageReference Include="Microsoft.OpenApi" Version="1.0.0-beta004" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -163,7 +163,7 @@ namespace OoasGui
|
|||
|
||||
OpenApiDocument document = EdmModel.ConvertToOpenApi();
|
||||
MemoryStream stream = new MemoryStream();
|
||||
document.Serialize(stream, OpenApiSpecVersion.OpenApi3_0, Format);
|
||||
document.Serialize(stream, OpenApiSpecVersion.OpenApi3_0_0, Format);
|
||||
stream.Flush();
|
||||
stream.Position = 0;
|
||||
string openApi = new StreamReader(stream).ReadToEnd();
|
||||
|
@ -208,7 +208,7 @@ namespace OoasGui
|
|||
using (FileStream fs = File.Create(output))
|
||||
{
|
||||
OpenApiDocument document = EdmModel.ConvertToOpenApi();
|
||||
document.Serialize(fs, OpenApiSpecVersion.OpenApi3_0, Format);
|
||||
document.Serialize(fs, OpenApiSpecVersion.OpenApi3_0_0, Format);
|
||||
fs.Flush();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
<Reference Include="Microsoft.OData.Edm, Version=7.3.1.10814, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.OData.Edm.7.3.1\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.OpenApi, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.OpenApi.1.0.0-beta004\lib\net46\Microsoft.OpenApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
@ -87,10 +90,6 @@
|
|||
<Project>{ff3acd93-19e0-486c-9c0f-fa1c2e7fc8c2}</Project>
|
||||
<Name>Microsoft.OpenApi.OData.Reader</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\tool\Microsoft.OpenApi\Microsoft.OpenApi.csproj">
|
||||
<Project>{3c31b79a-776f-4199-899f-3dc7aa767003}</Project>
|
||||
<Name>Microsoft.OpenApi</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.OData.Edm" version="7.3.1" targetFramework="net461" />
|
||||
<package id="Microsoft.OpenApi" version="1.0.0-beta004" targetFramework="net461" />
|
||||
</packages>
|
|
@ -55,7 +55,7 @@ namespace OoasUtil
|
|||
using (FileStream fs = File.Create(Output))
|
||||
{
|
||||
OpenApiDocument document = edmModel.ConvertToOpenApi(settings);
|
||||
document.Serialize(fs, OpenApiSpecVersion.OpenApi3_0, Format);
|
||||
document.Serialize(fs, OpenApiSpecVersion.OpenApi3_0_0, Format);
|
||||
fs.Flush();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace Microsoft.OpenApi.OData.Tests
|
|||
where T : IOpenApiSerializable
|
||||
{
|
||||
MemoryStream stream = new MemoryStream();
|
||||
element.Serialize(stream, OpenApiSpecVersion.OpenApi3_0, format);
|
||||
element.Serialize(stream, OpenApiSpecVersion.OpenApi3_0_0, format);
|
||||
stream.Position = 0;
|
||||
return new StreamReader(stream).ReadToEnd();
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace Microsoft.OpenApi.OData.Tests
|
|||
{
|
||||
var document = model.ConvertToOpenApi(settings);
|
||||
MemoryStream stream = new MemoryStream();
|
||||
document.Serialize(stream, OpenApiSpecVersion.OpenApi3_0, target);
|
||||
document.Serialize(stream, OpenApiSpecVersion.OpenApi3_0_0, target);
|
||||
stream.Flush();
|
||||
stream.Position = 0;
|
||||
return new StreamReader(stream).ReadToEnd();
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace Microsoft.OpenApi.OData.Generator.Tests
|
|||
Assert.Contains("skip", parameters.Select(p => p.Key));
|
||||
var skip = parameters.First(c => c.Key == "skip").Value;
|
||||
|
||||
string yaml = skip.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0);
|
||||
string yaml = skip.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0_0);
|
||||
Assert.Equal(
|
||||
@"name: $skip
|
||||
in: query
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace Microsoft.OpenApi.OData.Generator.Tests
|
|||
|
||||
// Assert
|
||||
var response = Assert.Single(responses).Value;
|
||||
string json = response.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0);
|
||||
string json = response.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0_0);
|
||||
|
||||
Assert.Equal(@"{
|
||||
""description"": ""error"",
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="Microsoft.OpenApi" Version="1.0.0-beta004" />
|
||||
<PackageReference Include="xunit" Version="2.3.0-beta5-build3769" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta5-build3769" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue