Share via


OpenApiYamlWriter Class

Definition

YAML writer.

public class OpenApiYamlWriter : Microsoft.OpenApi.Writers.OpenApiWriterBase
type OpenApiYamlWriter = class
    inherit OpenApiWriterBase
Public Class OpenApiYamlWriter
Inherits OpenApiWriterBase
Inheritance
OpenApiYamlWriter

Constructors

OpenApiYamlWriter(TextWriter, OpenApiWriterSettings)

Initializes a new instance of the OpenApiYamlWriter class.

OpenApiYamlWriter(TextWriter)

Initializes a new instance of the OpenApiYamlWriter class.

Fields

IndentationString

The indentation string to prepand to each line for each indentation level.

(Inherited from OpenApiWriterBase)
Scopes

Scope of the Open API element - object, array, property.

(Inherited from OpenApiWriterBase)

Properties

BaseIndentation

Base Indentation Level. This denotes how many indentations are needed for the property in the base object.

Settings

Settings for controlling how the OpenAPI document will be written out.

(Inherited from OpenApiWriterBase)
UseLiteralStyle

Allow rendering of multi-line strings using YAML | syntax

Writer

The text writer.

(Inherited from OpenApiWriterBase)

Methods

CurrentScope()

Get current scope.

(Inherited from OpenApiWriterBase)
DecreaseIndentation()

Decreases the level of indentation applied to the output.

(Inherited from OpenApiWriterBase)
EndScope(ScopeType)

End the scope of the given scope type.

(Inherited from OpenApiWriterBase)
Flush()

Flush the writer.

(Inherited from OpenApiWriterBase)
IncreaseIndentation()

Increases the level of indentation applied to the output.

(Inherited from OpenApiWriterBase)
IsArrayScope()

Whether the current scope is an array scope.

(Inherited from OpenApiWriterBase)
IsObjectScope()

Whether the current scope is an object scope.

(Inherited from OpenApiWriterBase)
IsTopLevelScope()

Whether the current scope is the top level (outermost) scope.

(Inherited from OpenApiWriterBase)
StartScope(ScopeType)

Start the scope given the scope type.

(Inherited from OpenApiWriterBase)
VerifyCanWritePropertyName(String)

Verifies whether a property name can be written based on whether the property name is a valid string and whether the current scope is an object scope.

(Inherited from OpenApiWriterBase)
WriteEndArray()

Write YAML end array.

WriteEndObject()

Write YAML end object.

WriteIndentation()

Write the indentation.

(Inherited from OpenApiWriterBase)
WriteNull()

Write null value.

WritePropertyName(String)

Write the property name and the delimiter.

WriteRaw(String)

Writes the content raw value.

WriteStartArray()

Write YAML start array.

WriteStartObject()

Write YAML start object.

WriteValue(Boolean)

Write boolean value.

(Inherited from OpenApiWriterBase)
WriteValue(DateTime)

Write DateTime value.

(Inherited from OpenApiWriterBase)
WriteValue(DateTimeOffset)

Write DateTimeOffset value.

(Inherited from OpenApiWriterBase)
WriteValue(Decimal)

Write decimal value.

(Inherited from OpenApiWriterBase)
WriteValue(Double)

Write double value.

(Inherited from OpenApiWriterBase)
WriteValue(Int32)

Write integer value.

(Inherited from OpenApiWriterBase)
WriteValue(Int64)

Write long value.

(Inherited from OpenApiWriterBase)
WriteValue(Object)

Write object value.

(Inherited from OpenApiWriterBase)
WriteValue(Single)

Write float value.

(Inherited from OpenApiWriterBase)
WriteValue(String)

Write string value.

WriteValueSeparator()

Write value separator.

Extension Methods

WriteAny<T>(IOpenApiWriter, T)

Write the IOpenApiAny value.

WriteExtensions(IOpenApiWriter, IDictionary<String,IOpenApiExtension>, OpenApiSpecVersion)

Write the specification extensions

WriteOptionalCollection(IOpenApiWriter, String, IEnumerable<String>, Action<IOpenApiWriter,String>)

Write the optional of collection string.

WriteOptionalCollection<T>(IOpenApiWriter, String, IEnumerable<T>, Action<IOpenApiWriter,T>)

Write the optional Open API object/element collection.

WriteOptionalMap(IOpenApiWriter, String, IDictionary<String,String>, Action<IOpenApiWriter,String>)

Write the optional Open API element map (string to string mapping).

WriteOptionalMap<T>(IOpenApiWriter, String, IDictionary<String,T>, Action<IOpenApiWriter,T>)

Write the optional Open API element map.

WriteOptionalMap<T>(IOpenApiWriter, String, IDictionary<String,T>, Action<IOpenApiWriter,String,T>)

Write the optional Open API element map.

WriteOptionalObject<T>(IOpenApiWriter, String, T, Action<IOpenApiWriter,T>)

Write the optional Open API object/element.

WriteProperty(IOpenApiWriter, String, Boolean, Boolean)

Write a boolean property.

WriteProperty(IOpenApiWriter, String, Nullable<Boolean>, Boolean)

Write a boolean property.

WriteProperty(IOpenApiWriter, String, String)

Write a string property.

WriteProperty<T>(IOpenApiWriter, String, T)

Write a string/number property.

WriteProperty<T>(IOpenApiWriter, String, Nullable<T>)

Write a primitive property.

WriteRequiredCollection<T>(IOpenApiWriter, String, IEnumerable<T>, Action<IOpenApiWriter,T>)

Write the required Open API object/element collection.

WriteRequiredMap(IOpenApiWriter, String, IDictionary<String,String>, Action<IOpenApiWriter,String>)

Write the required Open API element map (string to string mapping).

WriteRequiredMap<T>(IOpenApiWriter, String, IDictionary<String,T>, Action<IOpenApiWriter,T>)

Write the required Open API element map.

WriteRequiredObject<T>(IOpenApiWriter, String, T, Action<IOpenApiWriter,T>)

Write the required Open API object/element.

WriteRequiredProperty(IOpenApiWriter, String, String)

Write required string property.

Applies to