Files
furyhawk ee793f2f89 Refactor generated types for consistency and clarity
- Updated type definitions in `types.gen.ts` to use consistent formatting and remove unnecessary line breaks.
- Renamed types for better readability, such as changing `BodyLoginLoginAccessToken` to `Body_login_login_access_token`.
- Consolidated similar types and ensured all properties are consistently formatted.
- Added new types for item and user operations to enhance API interaction.
- Improved documentation comments for query parameters in weather-related data types.
2025-05-27 16:10:47 +08:00

29 lines
724 B
TypeScript

import { defineConfig } from "@hey-api/openapi-ts"
export default defineConfig({
client: "legacy/axios",
input: "./openapi.json",
output: "./src/client",
// exportSchemas: true,
plugins: [
{
name: "@hey-api/sdk",
// NOTE: this doesn't allow tree-shaking
asClass: true,
operationId: true,
methodNameBuilder: (operation) => {
// @ts-ignore
let name: string = operation.name
// @ts-ignore
const service: string = operation.service
if (service && name.toLowerCase().startsWith(service.toLowerCase())) {
name = name.slice(service.length)
}
return name.charAt(0).toLowerCase() + name.slice(1)
},
},
],
})