teobler / swr-request-generator

A tool for generating TypeScript code and interface from swagger by using SWR and axios as client.

Home Page:https://www.npmjs.com/package/@openapi-integration/swr-request-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not everything is generated when using multiple endpoints

Marco-Daniel opened this issue · comments

Hi,

Our backend generates two openapi.json files that we need to generate all the hooks necessary. When adding both of these to the clients array property only the data from the first json file gets converted to generated hooks, the data from the second file is nowhere to be found. If I use just one endpoint in the clients field I can generate it for both seperatly.

If anything is unclear please let me know. Thank you!

Hi @Marco-Daniel
Thanks for reporting this, could you check the latest code if this be fixed as your expectation?

Steps for validating:

  • clone this repo
  • run pnpm install to install dependencies
  • add your config file and yaml/json files to root dir
  • run pnpm start
  • check the generated file