-
-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Labels
bug 🔥Something isn't workingSomething isn't workingjavascriptPull requests that update Javascript codePull requests that update Javascript codeneeds info ⏳Further information is requiredFurther information is required
Description
Description
JSON file
{
"definitions": {
"treeNode": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/treeNode"
}
}
}
}
},
"openapi": "3.1.0",
"paths": {
"/tree": {
"post": {
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"$ref": "#/definitions/treeNode"
}
}
}
}
}
},
"operationId": "postTree"
}
}
}
}openapi-ts.config.ts
import { defineConfig } from '@hey-api/openapi-ts'
export default defineConfig({
input: './api.json',
output: {
format: 'biome',
lint: 'biome',
path: './http'
},
plugins: [
'@hey-api/schemas',
{
name: '@hey-api/client-fetch'
},
{
dates: true,
name: '@hey-api/transformers'
},
{
enums: 'javascript',
name: '@hey-api/typescript'
},
{
name: '@hey-api/sdk',
transformer: true
}
]
})after run openapi-ts
Error: Reference not found: #/definitions/treeNodeReproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
No response
Metadata
Metadata
Assignees
Labels
bug 🔥Something isn't workingSomething isn't workingjavascriptPull requests that update Javascript codePull requests that update Javascript codeneeds info ⏳Further information is requiredFurther information is required