We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b54732e commit ea0f03cCopy full SHA for ea0f03c
1 file changed
frontend-nextjs/openapi-ts.config.ts
@@ -1,9 +1,28 @@
1
import { defineConfig } from "@hey-api/openapi-ts"
2
3
export default defineConfig({
4
+ client: "legacy/axios",
5
input: "./openapi.json",
6
output: "./src/client",
7
+ // exportSchemas: true,
8
plugins: [
- "@hey-api/sdk"
9
+ {
10
+ name: "@hey-api/sdk",
11
+ // NOTE: this doesn't allow tree-shaking
12
+ asClass: true,
13
+ operationId: true,
14
+ methodNameBuilder: (operation) => {
15
+ // @ts-ignore
16
+ let name: string = operation.name
17
18
+ const service: string = operation.service
19
+
20
+ if (service && name.toLowerCase().startsWith(service.toLowerCase())) {
21
+ name = name.slice(service.length)
22
+ }
23
24
+ return name.charAt(0).toLowerCase() + name.slice(1)
25
+ },
26
27
],
28
})
0 commit comments