Class OpenApiExtensions
- Namespace
- GenerativeAI.Tools.Extensions
- Assembly
- GenerativeAI.Tools.dll
Extension methods for OpenApiSchema conversions and serialization.
public static class OpenApiExtensions
- Inheritance
-
OpenApiExtensions
- Inherited Members
Methods
ToJson(OpenApiSchema)
Converts an OpenApiSchema to its JSON string representation.
public static string ToJson(this OpenApiSchema schema)
Parameters
schemaOpenApiSchemaThe OpenApiSchema to serialize.
Returns
- string
A JSON string representation of the schema.
ToOpenApiSchema(Schema)
Converts a Schema to an OpenApiSchema.
public static OpenApiSchema ToOpenApiSchema(this Schema schema)
Parameters
schemaSchemaThe Schema to convert.
Returns
- OpenApiSchema
An OpenApiSchema equivalent of the input schema.