1.11.0 • Published 8 months ago

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

Weekly downloads
81
License
Apache-2.0
Repository
github
Last release
8 months 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"
enumMemberStyle"preserve" | "constant"The style to use for enum member names: preserve attempts to match the enum member name to the literal enum value from the spec; constant uses the constantStyle rules."constant"
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.11.0

8 months ago

1.10.2

8 months ago

1.10.1

8 months ago

1.10.0

8 months ago

1.9.1

9 months ago

1.9.0

9 months ago

1.8.0

10 months ago

1.7.2

11 months ago

1.7.1

11 months ago

1.7.0

11 months ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.6

1 year ago

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.3

2 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

0.34.0

3 years ago

0.35.0

3 years ago

0.32.1

4 years ago

0.32.0

4 years ago

0.33.0

4 years ago

0.31.5

4 years ago

0.31.2

4 years ago

0.30.0

4 years ago

0.31.1

4 years ago

0.31.0

4 years ago

0.29.2

4 years ago

0.29.1

4 years ago

0.29.0

4 years ago

0.28.0

4 years ago

0.27.0

4 years ago

0.25.1

4 years ago

0.25.0

4 years ago

0.24.0

4 years ago

0.23.1

4 years ago

0.23.0

4 years ago

0.22.0

4 years ago

0.21.1

4 years ago

0.21.0

4 years ago

0.20.0

4 years ago

0.19.3

4 years ago

0.19.2

4 years ago

0.19.1

4 years ago

0.19.0

4 years ago

0.18.0

4 years ago

0.17.0

4 years ago

0.16.3

4 years ago

0.16.2

4 years ago

0.16.1

4 years ago

0.16.0

4 years ago

0.13.0

4 years ago

0.13.1

4 years ago

0.15.0

4 years ago

0.14.0

4 years ago

0.12.0

4 years ago

0.11.0

4 years ago

0.10.5

4 years ago

0.10.4

4 years ago

0.10.3

4 years ago

0.10.2

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.15

5 years ago

0.3.14

5 years ago

0.3.13

5 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.2.2

5 years ago

0.1.0

5 years ago

0.0.25

5 years ago

0.0.26

5 years ago

0.0.27

5 years ago

0.0.28

5 years ago

0.0.23

5 years ago

0.0.24

5 years ago

0.0.21

5 years ago

0.0.22

5 years ago

0.0.20

5 years ago

0.0.18

5 years ago

0.0.19

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.14

5 years ago

0.0.15

5 years ago

0.0.13

5 years ago

0.0.10

5 years ago

0.0.11

5 years ago

0.0.12

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago