mirror of
https://github.com/furyhawk/home_stack.git
synced 2026-07-21 02:06:47 +00:00
- 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.
29 lines
724 B
TypeScript
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)
|
|
},
|
|
},
|
|
],
|
|
})
|