Skip to content

Commit

Permalink
fix: Fixed issue with xml docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed May 27, 2024
1 parent e62f8fc commit 6f532f4
Show file tree
Hide file tree
Showing 1,137 changed files with 70,059 additions and 38 deletions.
2 changes: 1 addition & 1 deletion src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</ItemGroup>

<PropertyGroup Label="Versioning">
<Version>0.8.5</Version>
<Version>0.8.6</Version>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerDefaultPreReleaseIdentifiers>dev</MinVerDefaultPreReleaseIdentifiers>
Expand Down
15 changes: 14 additions & 1 deletion src/libs/OpenApiGenerator.Core/Generation/Data.Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ public static EquatableArray<ModelData> PrepareData(
Schema = default,
})
.ToImmutableArray();
// var bodies = openApiDocument.Paths
// .SelectMany(path => path.Value.Operations.Select(operation => (operation.Value.OperationId, Operation: operation)))
// .SelectMany(x => x.Operation.Value?.RequestBody?.Content?.Values.Select(y => (x.OperationId, Parameter: y)) ?? [])
// .Where(x => x.Parameter.Schema.Type == "object")
// .Select(x => ModelData.FromSchema(
// x.Parameter.Schema.WithKey(x.OperationId + "Request"),
// settings) with
// {
// Schema = default,
// })
// .SelectMany(model => model.WithAdditionalModels())
// .ToImmutableArray();
var enumParameters = openApiDocument.Paths
.SelectMany(path => path.Value.Operations.Select(operation => (operation.Value.OperationId, Operation: operation)))
.SelectMany(x => x.Operation.Value.Parameters.Select(y => (x.OperationId, Parameter: y)))
Expand All @@ -89,7 +101,8 @@ public static EquatableArray<ModelData> PrepareData(
.Create([
..components,
..objectParameters,
..enumParameters
..enumParameters,
//..bodies,
])
.GroupBy(x => x.FileNameWithoutExtension)
.Select(x => x.First())
Expand Down
6 changes: 1 addition & 5 deletions src/libs/OpenApiGenerator.Core/Generation/Sources.Clients.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ public static string GenerateConstructors(
namespace {endPoint.Namespace}
{{
/// <summary>
/// {endPoint.Summary}
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
{(endPoint.Summary + "\nIf no httpClient is provided, a new one will be created.\nIf no baseUri is provided, the default baseUri from OpenAPI spec will be used.").ToXmlDocumentationSummary()}
public sealed partial class {endPoint.ClassName} : global::System.IDisposable
{{
private readonly global::System.Net.Http.HttpClient _httpClient;
Expand Down
Loading

0 comments on commit 6f532f4

Please sign in to comment.