Problem:
A openapi.yaml file containing only models (schemas) and no urls, will generate a client.ts file what throws TS6133 in the context of tsconfig.json configured with
"noUnusedLocals": true,
"noUnusedParameters": true,
This will cause builds that are using the generated code to fail at compile time.
How to reproduce:
Create openapi.yaml file with the following contents:
openapi: 3.0.0
info:
title: A test without urls
version: 0.0.1
description: Types for
servers: []
paths: {}
components:
schemas:
User:
type: object
properties:
id:
type: integer
name:
type: string
Run generate.js which contains the boilerplate code from README.md:
TS6133: types is declared but its value is never read.
TS6133: RequestContext is declared but its value is never read.

Problem:
A
openapi.yamlfile containing only models (schemas) and no urls, will generate aclient.tsfile what throwsTS6133in the context oftsconfig.jsonconfigured withThis will cause builds that are using the generated code to fail at compile time.
How to reproduce:
Create
openapi.yamlfile with the following contents:Run
generate.jswhich contains the boilerplate code from README.md: