Skip to content

Commit ea0f03c

Browse files
committed
chore: add env files and OpenAPI TypeScript config with updated credentials
1 parent b54732e commit ea0f03c

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
import { defineConfig } from "@hey-api/openapi-ts"
22

33
export default defineConfig({
4+
client: "legacy/axios",
45
input: "./openapi.json",
56
output: "./src/client",
7+
// exportSchemas: true,
68
plugins: [
7-
"@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+
// @ts-ignore
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+
},
827
],
928
})

0 commit comments

Comments
 (0)