swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

apiClassName can not be cutomized when modular is true

Open geekeren opened this issue 2 years ago • 2 comments

It seems no option named "apiClassName" for the generateApi function, and I also try to set name to 'CustomizedAPI', and add a hook to alter the api class name,

 hooks: {
    onPrepareConfig: (currentConfiguration) => {
      return {
        ...currentConfiguration,
        config: {
          ...currentConfiguration.config,
          apiClassName: 'CustomizedAPI'
        }
      }
    },
}

geekeren avatar Mar 07 '23 02:03 geekeren

Hi! Any updates?

RuBAN-GT avatar Oct 11 '23 17:10 RuBAN-GT

I found that I can pass apiClassName as a generateApi option as long as I flag it with // @ts-ignore and it will successfully apply to the output. I haven't dug into the package yet to see if this is a simple fix to the type declarations or not.

leonsbuddydave avatar Nov 14 '23 18:11 leonsbuddydave