OpenApiWriterBase Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Base class for Open API writer.
public abstract class OpenApiWriterBase : Microsoft.OpenApi.Writers.IOpenApiWriter
type OpenApiWriterBase = class
interface IOpenApiWriter
Public MustInherit Class OpenApiWriterBase
Implements IOpenApiWriter
- Inheritance
-
OpenApiWriterBase
- Derived
- Implements
Constructors
OpenApiWriterBase(TextWriter, OpenApiWriterSettings) |
Initializes a new instance of the OpenApiWriterBase class. |
OpenApiWriterBase(TextWriter) |
Initializes a new instance of the OpenApiWriterBase class. |
Fields
IndentationString |
The indentation string to prepand to each line for each indentation level. |
Scopes |
Scope of the Open API element - object, array, property. |
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. |
Writer |
The text writer. |
Methods
CurrentScope() |
Get current scope. |
DecreaseIndentation() |
Decreases the level of indentation applied to the output. |
EndScope(ScopeType) |
End the scope of the given scope type. |
Flush() |
Flush the writer. |
IncreaseIndentation() |
Increases the level of indentation applied to the output. |
IsArrayScope() |
Whether the current scope is an array scope. |
IsObjectScope() |
Whether the current scope is an object scope. |
IsTopLevelScope() |
Whether the current scope is the top level (outermost) scope. |
StartScope(ScopeType) |
Start the scope given the scope type. |
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. |
WriteEndArray() |
Write end array. |
WriteEndObject() |
Write end object. |
WriteIndentation() |
Write the indentation. |
WriteNull() |
Write null value. |
WritePropertyName(String) |
Write the start property. |
WriteRaw(String) |
Write content raw value. |
WriteStartArray() |
Write start array. |
WriteStartObject() |
Write start object. |
WriteValue(Boolean) |
Write boolean value. |
WriteValue(DateTime) |
Write DateTime value. |
WriteValue(DateTimeOffset) |
Write DateTimeOffset value. |
WriteValue(Decimal) |
Write decimal value. |
WriteValue(Double) |
Write double value. |
WriteValue(Int32) |
Write integer value. |
WriteValue(Int64) |
Write long value. |
WriteValue(Object) |
Write object value. |
WriteValue(Single) |
Write float value. |
WriteValue(String) |
Write string value. |
WriteValueSeparator() |
Writes a separator of a value if it's needed for the next value to be written. |