How do I use swagger-typescript-api with Xano?

Options

I am trying to use swagger-typescript-api with Xano

https://github.com/acacode/swagger-typescript-api

My Swagger is here:

https://x8ki-letl-twmt.n7.xano.io/api:oyatO036?type=json

I use this command line:

npx swagger-typescript-api -p https://x8ki-letl-twmt.n7.xano.io/api:oyatO036?type=json -o ./src -n nickBlog.ts --axios

And I get a big, ugly error, the heart of which is:

at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async CodeGenProcess.start (/home/runner/.npm/_npx/ad2f6472e51cc62f/node_modules/swagger-typescript-api/src/code-gen-process.js:91:21)
at async generateApi (/home/runner/.npm/_npx/ad2f6472e51cc62f/node_modules/swagger-typescript-api/src/index.js:22:12) {

reason: 'end of the stream or a document separator is expected',
mark: {
name: null, …

Am I doing something wrong? Is the Swagger not what is expected by swagger-typescript-api?

Tagged:

Best Answer

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Answer ✓
    Options

    Hi, Nick! Glad you got this figured out. I'd like to leave the post just in case other users can benefit from this in the future. Thanks!

Answers