Skip to content
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
6 changes: 3 additions & 3 deletions src/Microsoft.OpenApi.Workbench/MainModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public class MainModel : INotifyPropertyChanged
{
private string _input;

private bool _inlineLocal = false;
private bool _inlineExternal = false;
private bool _inlineLocal;
private bool _inlineExternal;

private bool _resolveExternal = false;
private bool _resolveExternal;

private string _inputFile;

Expand Down
18 changes: 9 additions & 9 deletions src/Microsoft.OpenApi.Workbench/StatsVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,63 @@ namespace Microsoft.OpenApi.Workbench
{
internal class StatsVisitor : OpenApiVisitorBase
{
public int ParameterCount { get; set; } = 0;
public int ParameterCount { get; set; }

public override void Visit(OpenApiParameter parameter)
{
ParameterCount++;
}

public int SchemaCount { get; set; } = 0;
public int SchemaCount { get; set; }

public override void Visit(OpenApiSchema schema)
{
SchemaCount++;
}

public int HeaderCount { get; set; } = 0;
public int HeaderCount { get; set; }

public override void Visit(IDictionary<string, OpenApiHeader> headers)
{
HeaderCount++;
}

public int PathItemCount { get; set; } = 0;
public int PathItemCount { get; set; }

public override void Visit(OpenApiPathItem pathItem)
{
PathItemCount++;
}

public int RequestBodyCount { get; set; } = 0;
public int RequestBodyCount { get; set; }

public override void Visit(OpenApiRequestBody requestBody)
{
RequestBodyCount++;
}

public int ResponseCount { get; set; } = 0;
public int ResponseCount { get; set; }

public override void Visit(OpenApiResponses response)
{
ResponseCount++;
}

public int OperationCount { get; set; } = 0;
public int OperationCount { get; set; }

public override void Visit(OpenApiOperation operation)
{
OperationCount++;
}

public int LinkCount { get; set; } = 0;
public int LinkCount { get; set; }

public override void Visit(OpenApiLink operation)
{
LinkCount++;
}

public int CallbackCount { get; set; } = 0;
public int CallbackCount { get; set; }

public override void Visit(OpenApiCallback callback)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Models/OpenApiExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class OpenApiExample : IOpenApiSerializable, IOpenApiReferenceable, IOpen
/// <summary>
/// Indicates object is a placeholder reference to an actual object and does not contain valid data.
/// </summary>
public bool UnresolvedReference { get; set; } = false;
public bool UnresolvedReference { get; set; }

/// <summary>
/// Parameter-less constructor
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.OpenApi/Models/OpenApiParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class OpenApiParameter : IOpenApiSerializable, IOpenApiReferenceable, IEf
/// <summary>
/// Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
/// </summary>
public bool Deprecated { get; set; } = false;
public bool Deprecated { get; set; }

/// <summary>
/// Sets the ability to pass empty-valued parameters.
Expand All @@ -70,7 +70,7 @@ public class OpenApiParameter : IOpenApiSerializable, IOpenApiReferenceable, IEf
/// If style is used, and if behavior is n/a (cannot be serialized),
/// the value of allowEmptyValue SHALL be ignored.
/// </summary>
public bool AllowEmptyValue { get; set; } = false;
public bool AllowEmptyValue { get; set; }

/// <summary>
/// Describes how the parameter value will be serialized depending on the type of the parameter value.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Models/OpenApiReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class OpenApiReference : IOpenApiSerializable
/// <summary>
/// The OpenApiDocument that is hosting the OpenApiReference instance. This is used to enable dereferencing the reference.
/// </summary>
public OpenApiDocument HostDocument { get; set; } = null;
public OpenApiDocument HostDocument { get; set; }

/// <summary>
/// Gets the full reference string for v3.0.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public OpenApiJsonWriter(TextWriter textWriter, OpenApiWriterSettings settings,
/// <summary>
/// Indicates whether or not the produced document will be written in a compact or pretty fashion.
/// </summary>
private bool _produceTerseOutput = false;
private readonly bool _produceTerseOutput;

/// <summary>
/// Base Indentation Level.
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public ReferenceInlineSetting ReferenceInline {
/// <summary>
/// Indicates if local references should be rendered as an inline object
/// </summary>
public bool InlineLocalReferences { get; set; } = false;
public bool InlineLocalReferences { get; set; }

/// <summary>
/// Indicates if external references should be rendered as an inline object
/// </summary>
public bool InlineExternalReferences { get; set; } = false;
public bool InlineExternalReferences { get; set; }

internal bool ShouldInlineReference(OpenApiReference reference)
{
Expand Down