move the gui project into src folder
This commit is contained in:
parent
31c7746e30
commit
66126269ec
|
@ -11,7 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi", "tool\M
|
|||
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", "OoasGui\OoasGui.csproj", "{79B190E8-EDB0-4C03-8FD8-EB48E4807CFB}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OoasGui", "src\OoasGui\OoasGui.csproj", "{79B190E8-EDB0-4C03-8FD8-EB48E4807CFB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
|
@ -27,11 +27,11 @@ namespace Microsoft.OpenApi.OData
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Convert <see cref="IEdmModel"/> to <see cref="OpenApiDocument"/> with referenced model.
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <param name="referencedDocs"></param>
|
||||
/// <returns></returns>
|
||||
/// <param name="model">The Edm model.</param>
|
||||
/// <param name="referencedDocs">The referenced models.</param>
|
||||
/// <returns>The converted Open API document object.</returns>
|
||||
public static OpenApiDocument ConvertToOpenApi(this IEdmModel model,
|
||||
out IEnumerable<OpenApiDocument> referencedDocs)
|
||||
{
|
||||
|
@ -39,11 +39,12 @@ namespace Microsoft.OpenApi.OData
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Convert <see cref="IEdmModel"/> to <see cref="OpenApiDocument"/> with referenced model.
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <param name="referencedDocs"></param>
|
||||
/// <returns></returns>
|
||||
/// <param name="model">The Edm model.</param>
|
||||
/// <param name="settings">The convert settings.</param>
|
||||
/// <param name="referencedDocs">The referenced models.</param>
|
||||
/// <returns>The converted Open API document object.</returns>
|
||||
public static OpenApiDocument ConvertToOpenApi(this IEdmModel model, OpenApiConvertSettings settings,
|
||||
out IEnumerable<OpenApiDocument> referencedDocs)
|
||||
{
|
||||
|
|
|
@ -10,14 +10,40 @@ using Microsoft.OData.Edm;
|
|||
namespace Microsoft.OpenApi.OData.Generator
|
||||
{
|
||||
/// <summary>
|
||||
/// The wrapper for the <see cref="IEdmModel"/>,.<see cref="OpenApiSerializerSettings"/>.
|
||||
/// Context information for the <see cref="IEdmModel"/>, configuration, etc.
|
||||
/// </summary>
|
||||
internal class ODataContext
|
||||
{
|
||||
private IDictionary<IEdmTypeReference, IEdmOperation> _boundOperations;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of <see cref="ODataContext"/> class.
|
||||
/// </summary>
|
||||
/// <param name="model">The Edm model.</param>
|
||||
public ODataContext(IEdmModel model)
|
||||
: this(model, new OpenApiConvertSettings())
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of <see cref="ODataContext"/> class.
|
||||
/// </summary>
|
||||
/// <param name="model">The Edm model.</param>
|
||||
/// <param name="settings">The convert setting.</param>
|
||||
public ODataContext(IEdmModel model, OpenApiConvertSettings settings)
|
||||
{
|
||||
Model = model ?? throw Error.ArgumentNull(nameof(model));
|
||||
Settings = settings ?? throw Error.ArgumentNull(nameof(settings));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Edm model.
|
||||
/// </summary>
|
||||
public IEdmModel Model { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Entity Container.
|
||||
/// </summary>
|
||||
public IEdmEntityContainer EntityContainer
|
||||
{
|
||||
get
|
||||
|
@ -41,18 +67,6 @@ namespace Microsoft.OpenApi.OData.Generator
|
|||
}
|
||||
}
|
||||
|
||||
public ODataContext(IEdmModel model)
|
||||
: this(model, new OpenApiConvertSettings())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ODataContext(IEdmModel model, OpenApiConvertSettings settings)
|
||||
{
|
||||
Model = model ?? throw Error.ArgumentNull(nameof(model));
|
||||
Settings = settings ?? throw Error.ArgumentNull(nameof(settings));
|
||||
}
|
||||
|
||||
public IEnumerable<IEdmOperation> FindOperations(IEdmEntityType entityType, bool collection)
|
||||
{
|
||||
string fullTypeName = collection ? "Collection(" + entityType.FullName() + ")" :
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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>
|
||||
<HintPath>..\..\packages\Microsoft.OData.Edm.7.3.1\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
@ -83,11 +83,11 @@
|
|||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\Microsoft.OpenApi.OData.Reader\Microsoft.OpenApi.OData.Reader.csproj">
|
||||
<ProjectReference Include="..\Microsoft.OpenApi.OData.Reader\Microsoft.OpenApi.OData.Reader.csproj">
|
||||
<Project>{ff3acd93-19e0-486c-9c0f-fa1c2e7fc8c2}</Project>
|
||||
<Name>Microsoft.OpenApi.OData.Reader</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\tool\Microsoft.OpenApi\Microsoft.OpenApi.csproj">
|
||||
<ProjectReference Include="..\..\tool\Microsoft.OpenApi\Microsoft.OpenApi.csproj">
|
||||
<Project>{3c31b79a-776f-4199-899f-3dc7aa767003}</Project>
|
||||
<Name>Microsoft.OpenApi</Name>
|
||||
</ProjectReference>
|
Loading…
Reference in a new issue