Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Microsoft.OpenApi from 1.6.12 to 1.6.13 #4084

Merged
merged 4 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Kiota.Builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.1.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.1.1" />
<PackageReference Include="Microsoft.kiota.Serialization.Multipart" Version="1.1.1" />
<PackageReference Include="Microsoft.OpenApi" Version="1.6.12" />
<PackageReference Include="Microsoft.OpenApi" Version="1.6.13" />
<PackageReference Include="Microsoft.OpenApi.ApiManifest" Version="0.5.4-preview" />
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.6.12" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Validation/DivergentResponseSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class DivergentResponseSchema : ValidationRule<OpenApiOperation>
{
private static readonly OpenApiSchemaComparer schemaComparer = new();
private static readonly HashSet<string> validStatusCodes = new(OpenApiOperationExtensions.SuccessCodes, StringComparer.OrdinalIgnoreCase);
public DivergentResponseSchema(GenerationConfiguration configuration) : base((context, operation) =>
public DivergentResponseSchema(GenerationConfiguration configuration) : base(nameof(DivergentResponseSchema), (context, operation) =>
{
var schemas = operation.GetResponseSchemas(validStatusCodes, configuration.StructuredMimeTypes);
if (schemas.GroupBy(x => x, schemaComparer).Count() > 1)
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Validation/GetWithBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Kiota.Builder.Validation;

public class GetWithBody : ValidationRule<OpenApiPathItem>
{
public GetWithBody() : base(static (context, pathItem) =>
public GetWithBody() : base(nameof(GetWithBody), static (context, pathItem) =>
{
if (pathItem.Operations.TryGetValue(OperationType.Get, out var getOperation) && getOperation.RequestBody != null)
context.CreateWarning(nameof(GetWithBody), "A GET operation with a body was found. The request body will be ignored.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class InconsistentTypeFormatPair : ValidationRule<OpenApiSchema>
"null",
"object",
};
public InconsistentTypeFormatPair() : base(static (context, schema) =>
public InconsistentTypeFormatPair() : base(nameof(InconsistentTypeFormatPair), static (context, schema) =>
{
if (string.IsNullOrEmpty(schema?.Type) || string.IsNullOrEmpty(schema.Format) || KnownAndNotSupportedFormats.knownAndUnsupportedFormats.Contains(schema.Format) || escapedTypes.Contains(schema.Type))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class KnownAndNotSupportedFormats : ValidationRule<OpenApiSchema>
"relative-json-pointer",
"regex",
};
public KnownAndNotSupportedFormats() : base(static (context, schema) =>
public KnownAndNotSupportedFormats() : base(nameof(KnownAndNotSupportedFormats), static (context, schema) =>
{
if (!string.IsNullOrEmpty(schema.Format) && knownAndUnsupportedFormats.Contains(schema.Format))
context.CreateWarning(nameof(KnownAndNotSupportedFormats), $"The format {schema.Format} is not supported by Kiota and the string type will be used.");
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Validation/MissingDiscriminator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Kiota.Builder.Validation;
public class MissingDiscriminator : ValidationRule<OpenApiDocument>
{
public MissingDiscriminator(GenerationConfiguration configuration) : base((context, document) =>
public MissingDiscriminator(GenerationConfiguration configuration) : base(nameof(MissingDiscriminator), (context, document) =>
{
var idx = new ConcurrentDictionary<string, ConcurrentDictionary<string, bool>>(StringComparer.OrdinalIgnoreCase);
document.InitializeInheritanceIndex(idx);
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Validation/MultipleServerEntries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Kiota.Builder.Validation;
public class MultipleServerEntries : ValidationRule<OpenApiDocument>
{
public MultipleServerEntries() : base(static (context, document) =>
public MultipleServerEntries() : base(nameof(MultipleServerEntries), static (context, document) =>
{
if (document.Servers.GroupBy(static x => x.Url, StringComparer.OrdinalIgnoreCase).Count() > 1)
context.CreateWarning(nameof(MultipleServerEntries),
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Validation/NoContentWithBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Kiota.Builder.Validation;

public class NoContentWithBody : ValidationRule<OpenApiOperation>
{
public NoContentWithBody() : base(static (context, operation) =>
public NoContentWithBody() : base(nameof(NoContentWithBody), static (context, operation) =>
{
if (operation.Responses.TryGetValue("204", out var response) && (response?.Content?.Any() ?? false))
context.CreateWarning(nameof(NoContentWithBody), "A 204 response with a body media type was found. The response body will be ignored.");
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Validation/NoServerEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Kiota.Builder.Validation;

public class NoServerEntry : ValidationRule<OpenApiDocument>
{
public NoServerEntry() : base(static (context, document) =>
public NoServerEntry() : base(nameof(NoServerEntry), static (context, document) =>
{
if (!document.Servers.Any() || string.IsNullOrEmpty(document.Servers.First().Url?.TrimEnd('/')))
context.CreateWarning(nameof(NoServerEntry),
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Validation/UrlFormEncodedComplex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class UrlFormEncodedComplex : ValidationRule<OpenApiOperation>
private static readonly StructuredMimeTypesCollection validContentTypes = new() {
"application/x-www-form-urlencoded",
};
public UrlFormEncodedComplex() : base(static (context, operation) =>
public UrlFormEncodedComplex() : base(nameof(UrlFormEncodedComplex), static (context, operation) =>
{
if (operation.GetRequestSchema(validContentTypes) is OpenApiSchema requestSchema)
ValidateSchema(requestSchema, context, operation.OperationId, "request body");
Expand Down
Loading