I'm trying to use openapi-tui with an openapi document generated by the elysia/swagger plugin [link].
Graphical interfaces like scalar [link] don't seem to have a problem with it.
This is a stripped down version of the document that still raises the error:
{
"openapi": "3.0.3",
"info": {
"title": "Elysia Documentation",
"description": "Development documentation",
"version": "0.0.0"
},
"paths": {
"/users/": {
"get": {
"responses": {
"200": {
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"phoneNumberPrefix": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
},
"required": [
"id",
"createdAt",
"name",
"email",
"birthDate",
"phoneNumberPrefix",
"phoneNumber"
]
},
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"phoneNumberPrefix": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
},
"required": [
"id",
"createdAt",
"name",
"email",
"birthDate",
"phoneNumberPrefix",
"phoneNumber"
]
}
}
},
"multipart/form-data": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"phoneNumberPrefix": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
},
"required": [
"id",
"createdAt",
"name",
"email",
"birthDate",
"phoneNumberPrefix",
"phoneNumber"
]
}
}
},
"text/plain": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"phoneNumberPrefix": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
},
"required": [
"id",
"createdAt",
"name",
"email",
"birthDate",
"phoneNumberPrefix",
"phoneNumber"
]
}
}
}
}
}
},
"operationId": "getUsers",
"tags": [
"User"
]
}
}
},
"components": {
"schemas": {}
}
}
openapi-tui error: Something went wrong
Error:
0: paths: data did not match any variant of untagged enum ObjectOrRef at line 8 column 12
I'm trying to use openapi-tui with an openapi document generated by the elysia/swagger plugin [link].
Graphical interfaces like scalar [link] don't seem to have a problem with it.
This is a stripped down version of the document that still raises the error:
openapi-tui -i ./api.json