TypeScript generation hey-api 0.47.0
# package-development
m
Failing to generate TypeScript from Swagger using @hey-api/openapi-ts 0.47.0
Error: šŸ”„ Unexpected error occurred. 🚫 input not provided - provide path to OpenAPI specification My config is:
Copy code
export default defineConfig({
    client: 'fetch',
    input: 'https://localhost:44378/umbraco/swagger/csp/swagger.json',
    debug: true,
    output: {
        format: 'prettier',
        lint: 'eslint',
        path: './src/api',
    },
    types: {
        enums: 'typescript',
    },
    schemas: false,
});
Validating the Json file I get this error:
Copy code
Semantic error at components.securitySchemes.Backoffice User
Component names can only contain the characters A-Z a-z 0-9 - . _
Jump to line 145
"Backoffice User" remoing the same space in Umbraco's definition fixes the validation error at least šŸ˜„
d
m
wonder if its
cross-env NODE_TLS_REJECT_UNAUTHORIZED=0
in your command
Moving to http not https and had to use --input and --output
103 Views