Class GeminiSchema
- Namespace
- Uralstech.UGemini.Models.Generation.Schema
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.
public class GeminiSchema
- Inheritance
-
GeminiSchema
- Extension Methods
Fields
Description
A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.
public string Description
Field Value
Enum
Possible values of the element of String with enum format.
public string[] Enum
Field Value
- string[]
Remarks
For example we can define an Enum Direction as:
GeminiSchema enumSchema = new()
{
Type = GeminiSchemaDataType.String,
Format = GeminiSchemaDataFormat.Enum,
Enum = new string[]
{
"EAST",
"NORTH",
"SOUTH",
"WEST",
},
};
Format
The format of the data. This is used only for primitive datatypes.
public GeminiSchemaDataFormat Format
Field Value
Items
Schema of the elements of Array.
public GeminiSchema Items
Field Value
MaxItems
Optional. Maximum number of the elements for Array.
public long? MaxItems
Field Value
- long?
MinItems
Optional. Minimum number of the elements for Array.
public long? MinItems
Field Value
- long?
Nullable
Indicates if the value may be null.
public bool? Nullable
Field Value
- bool?
Properties
The properties of Object.
public Dictionary<string, GeminiSchema> Properties
Field Value
Required
Required properties of Object.
public string[] Required
Field Value
- string[]
Type
Data type.
public GeminiSchemaDataType Type