Class VertexAiSchemaConverter

java.lang.Object
org.springframework.ai.vertexai.gemini.schema.VertexAiSchemaConverter

public final class VertexAiSchemaConverter extends Object
Utility class for converting OpenAPI schemas to Vertex AI Schema objects.
Since:
1.1.0
  • Method Details

    • fromOpenApiSchema

      public static com.google.cloud.vertexai.api.Schema fromOpenApiSchema(String openApiSchema)
      Converts an OpenAPI schema string to a Vertex AI Schema object.
      Parameters:
      openApiSchema - The OpenAPI schema in JSON format
      Returns:
      A Schema object representing the OpenAPI schema
      Throws:
      RuntimeException - if the schema cannot be parsed