Schema Class

The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object.

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class Schema
Inheritance
Object    Schema

Constructors

SchemaInitializes a new instance of the Schema class

Properties

Description Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.
Enum Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as: {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
Format Optional. The format of the data. This is used only for primitive datatypes. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 for STRING type: enum
Items Optional. Schema of the elements of Type.ARRAY.
MaxItems Optional. Maximum number of the elements for Type.ARRAY.
MinItems Optional. Minimum number of the elements for Type.ARRAY.
Nullable Optional. Indicates if the value may be null.
Properties Optional. Properties of Type.OBJECT. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
PropertyOrdering Optional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response.
Required Optional. Required properties of Type.OBJECT.
Type Required. Data type.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also