Table of Contents

Class OpenApiStats

Namespace
Refitter.Core.Validation
Assembly
Refitter.Core.dll

Walks an OpenAPI document and collects counts of its elements.

public class OpenApiStats : OpenApiVisitorBase
Inheritance
OpenApiStats
Inherited Members

Properties

CallbackCount

Gets or sets the number of callbacks found.

public int CallbackCount { get; set; }

Property Value

int

HeaderCount

Gets or sets the number of headers found.

public int HeaderCount { get; set; }

Property Value

int

LinkCount

Gets or sets the number of links found.

public int LinkCount { get; set; }

Property Value

int

OperationCount

Gets or sets the number of operations found.

public int OperationCount { get; set; }

Property Value

int

ParameterCount

Gets or sets the number of parameters found.

public int ParameterCount { get; set; }

Property Value

int

PathItemCount

Gets or sets the number of path items found.

public int PathItemCount { get; set; }

Property Value

int

RequestBodyCount

Gets or sets the number of request bodies found.

public int RequestBodyCount { get; set; }

Property Value

int

ResponseCount

Gets or sets the number of responses found.

public int ResponseCount { get; set; }

Property Value

int

SchemaCount

Gets or sets the number of schemas found.

public int SchemaCount { get; set; }

Property Value

int

Methods

ToString()

Returns a formatted string with all element counts.

public override string ToString()

Returns

string

Visit(IOpenApiCallback)

Increments CallbackCount.

public override void Visit(IOpenApiCallback callback)

Parameters

callback IOpenApiCallback

Increments LinkCount.

public override void Visit(IOpenApiLink link)

Parameters

link IOpenApiLink

Visit(IOpenApiParameter)

Increments ParameterCount.

public override void Visit(IOpenApiParameter parameter)

Parameters

parameter IOpenApiParameter

Visit(IOpenApiPathItem)

Increments PathItemCount.

public override void Visit(IOpenApiPathItem pathItem)

Parameters

pathItem IOpenApiPathItem

Visit(IOpenApiRequestBody)

Increments RequestBodyCount.

public override void Visit(IOpenApiRequestBody requestBody)

Parameters

requestBody IOpenApiRequestBody

Visit(IOpenApiSchema)

Increments SchemaCount.

public override void Visit(IOpenApiSchema schema)

Parameters

schema IOpenApiSchema

Visit(OpenApiOperation)

Increments OperationCount.

public override void Visit(OpenApiOperation operation)

Parameters

operation OpenApiOperation

Visit(OpenApiResponses)

Adds the number of responses to ResponseCount.

public override void Visit(OpenApiResponses response)

Parameters

response OpenApiResponses

Visit(IDictionary<string, IOpenApiHeader>)

Adds the number of headers to HeaderCount.

public override void Visit(IDictionary<string, IOpenApiHeader> headers)

Parameters

headers IDictionary<string, IOpenApiHeader>