1.6.1 • Published 1 month ago

@openapi-generator-plus/typescript-fetch-client-generator v1.6.1

Weekly downloads
81
License
Apache-2.0
Repository
github
Last release
1 month ago

TypeScript Fetch Browser API generator for OpenAPI Generator Plus

An OpenAPI Generator Plus template for a TypeScript API client using Fetch in a Browser. For an API client to use in Node applications, see typescript-fetch-node-client-generator.

Using

See the OpenAPI Generator Plus documentation for how to use generator templates.

Config file

The available config file properties are:

Project layout

PropertyTypeDescriptionDefault
relativeSourceOutputPathstringThe path to output generated source code, relative to the output path../ or ./src if npm is specified.

Code style

PropertyTypeDescriptionDefault
constantStyle"allCapsSnake"\|"allCaps"\|"camelCase"\|"pascalCase"The style to use for constant naming."pascalCase"
dateApproach"native"\|"string"\|"blind-date"Whether to use string for date and time and Date for date-time, or just string, or whether to use blind-date for dates and times.native
legacyUnnamespacedModelSupportbooleanGenerate unnamespaced versions of the models.false
includePolyfillsbooleanInclude polyfills for features that browsers might not support or support well.true

blind-date

The blind-date library provides some typesafety for dates and times as strings in TypeScript. You can configure the generated code using blind-date:

PropertyTypeDescriptionDefault
blindDateBlindDateConfigConfiguration for blind-date.undefined

BlindDateConfig

PropertyTypeDescriptionDefault
dateTimeImplementationstringThe date-time implementation to use; either OffsetDateTimeString or LocalDateTimeString.OffsetDateTimeString

TypeScript

A tsconfig.json file will be output if you specify any of the TypeScript config options.

PropertyTypeDescriptionDefault
typescriptTypeScriptConfigConfiguration for the tsconfig.json file.undefined

TypeScriptConfig

PropertyTypeDescriptionDefault
targetstringThe ECMAScript target version.ES5
libstring[]An array of libs to use in tsconfig.jsonThe appropriate lib for the target + 'DOM'

Packaging

PropertyTypeDescriptionDefault
npmNpmConfigConfiguration for generating an npm package.jsonundefined

NpmConfig

PropertyTypeDescriptionDefault
namestringThe package nametypescript-fetch-api
versionstringThe package version0.0.1
repositorystringThe URL to the package repositoryundefined

Overrides

PropertyTypeDescriptionDefault
customTemplatesstringThe path to a directory containing custom Handlebars templates, relative to the config file. See Customising below.undefined

Customising

This generator supports a customTemplates config file property to specify a directory containing Handlebars templates that will be used to override built-in templates.

Any custom template will have the original template available as a partial named by prefixing the template name with original, and then upper-casing the first letter, e.g. originalModelEnum.

Some of the templates in the generator are designed to support overriding for custom requirements. Please inspect the templates in the templates directory.

1.6.1

1 month ago

1.6.0

2 months ago

1.5.6

4 months ago

1.5.5

5 months ago

1.5.4

5 months ago

1.5.3

5 months ago

1.5.2

5 months ago

1.5.1

7 months ago

1.5.0

1 year ago

1.4.3

1 year ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.2.0

2 years ago

1.2.1

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

0.34.0

2 years ago

0.35.0

2 years ago

0.32.1

3 years ago

0.32.0

3 years ago

0.33.0

3 years ago

0.31.5

3 years ago

0.31.2

3 years ago

0.30.0

3 years ago

0.31.1

3 years ago

0.31.0

3 years ago

0.29.2

3 years ago

0.29.1

3 years ago

0.29.0

3 years ago

0.28.0

3 years ago

0.27.0

3 years ago

0.25.1

3 years ago

0.25.0

3 years ago

0.24.0

3 years ago

0.23.1

3 years ago

0.23.0

3 years ago

0.22.0

3 years ago

0.21.1

3 years ago

0.21.0

3 years ago

0.20.0

3 years ago

0.19.3

3 years ago

0.19.2

3 years ago

0.19.1

3 years ago

0.19.0

3 years ago

0.18.0

3 years ago

0.17.0

3 years ago

0.16.3

3 years ago

0.16.2

3 years ago

0.16.1

3 years ago

0.16.0

3 years ago

0.13.0

3 years ago

0.13.1

3 years ago

0.15.0

3 years ago

0.14.0

3 years ago

0.12.0

3 years ago

0.11.0

3 years ago

0.10.5

3 years ago

0.10.4

3 years ago

0.10.3

3 years ago

0.10.2

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.15

4 years ago

0.3.14

4 years ago

0.3.13

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.2.2

4 years ago

0.1.0

4 years ago

0.0.25

4 years ago

0.0.26

4 years ago

0.0.27

4 years ago

0.0.28

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.20

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.13

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago