93 lines
2.8 KiB
JSON
93 lines
2.8 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://effect.website/schemas/ai-codegen.json",
|
|
"title": "Effect AI Codegen Configuration",
|
|
"description": "Configuration for @effect/ai-codegen code generation",
|
|
"type": "object",
|
|
"required": ["spec", "output"],
|
|
"properties": {
|
|
"spec": {
|
|
"description": "OpenAPI specification source - URL, file path, or structured resolver config",
|
|
"oneOf": [
|
|
{
|
|
"type": "string",
|
|
"description": "URL or file path to the OpenAPI specification"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"description": "Stainless stats resolver - fetches stats.yml and extracts openapi_spec_url",
|
|
"required": ["type", "statsUrl"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"const": "stainless-stats",
|
|
"description": "Resolver type"
|
|
},
|
|
"statsUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "URL to Stainless .stats.yml file containing openapi_spec_url"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"output": {
|
|
"type": "string",
|
|
"description": "Output file path relative to the package directory"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name for the generated client (defaults to 'Client')"
|
|
},
|
|
"typeOnly": {
|
|
"type": "boolean",
|
|
"description": "Generate type-only output without runtime code",
|
|
"default": false
|
|
},
|
|
"header": {
|
|
"type": "string",
|
|
"description": "Content to prepend to the generated file (e.g. module-level JSDoc)"
|
|
},
|
|
"patches": {
|
|
"type": "array",
|
|
"description": "JSON Patch documents to apply to the spec before generation. Each item can be a file path or inline JSON array.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"replacements": {
|
|
"type": "array",
|
|
"description": "Text replacements to apply to generated code.",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["from", "to"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"from": {
|
|
"type": "string",
|
|
"description": "The string to search for"
|
|
},
|
|
"to": {
|
|
"type": "string",
|
|
"description": "The string to replace with"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"excludeAnnotations": {
|
|
"type": "array",
|
|
"description": "Annotation keys to exclude from generated schema code (e.g. [\"examples\"]).",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"disableAdditionalProperties": {
|
|
"type": "boolean",
|
|
"description": "When true, forces additionalProperties to false on all object schemas, preventing StructWithRest emission.",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|