Class
JsonContentTypeHandler
Provides JSON example generation for types used in documentation.
public class JsonContentTypeHandler : IExampleBodyTypeHandler, IExampleParameterTypeHandler, IContentSchemaTypeHandlerInheritance #
object ← JsonContentTypeHandler
Implements #
IExampleBodyTypeHandler, IExampleParameterTypeHandler, IContentSchemaTypeHandler
Inherited Members #
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors #
| Name | Description |
|---|---|
| JsonContentTypeHandler(IJsonTypeInfoResolver, JsonSerializerOptions) | Initializes a new instance of the JsonContentTypeHandler class with the specified type resolver and serializer options. |
| JsonContentTypeHandler(JsonSerializerOptions) | Initializes a new instance of the JsonContentTypeHandler class with the specified serializer options and a default type resolver. |
| JsonContentTypeHandler() | Initializes a new instance of the JsonContentTypeHandler class with default serializer options and type resolver. |
Properties #
| Name | Description |
|---|---|
| EnumerationExampleCount | Gets or sets the number of items to include when generating examples for enumerable types. |
| IncludeDescriptionAnnotations | Gets or sets a value indicating whether to include XML documentation comments in the generated examples. |
| Shared | Gets the shared singleton instance of JsonContentTypeHandler. |
Methods #
| Name | Description |
|---|---|
| GetBodyExampleForType(Type) | Generates a JSON body example for the specified type. |
| GetJsonSchemaForType(Type) | Generates a JSON schema that describes the specified type. |
| GetParameterExamplesForType(Type) | Generates parameter examples for the specified type. |