ExOpenAI.Codegen.parse_component_schema
You're seeing just the function
parse_component_schema, go back to ExOpenAI.Codegen module for more information.
Parses the given schema recursively into a normalize representation such as %{description: "", example: "", name: "", type: ""}.
A "component schema" is what is defined in the original OpenAI openapi document under the path /components/schema and could look like this:
ChatCompletionRequestMessage:
type: object
properties:
content:
type: string
description: The contents of the message
name:
type: string
description: The name of the user in a multi-user chat
required:
- namerequired_propswill consist of all properties that were listed under the "required" listoptional_propswill be all others
"Type" will get normalized into a internal representation consiting of all it's nested children that can be unfolded easily later on:
- "string" -> "string"
- "integer" -> "integer"
- "object" -> {:object, %{nestedobject...}}
"array" -> {:array, "string" | "integer" | etc}