feat(openapi): Add modified typescript-fetch template
This template is modified from the original one, to handle multiple status-code handling of response. Don't ask me how they work, I don't quite understand them in depth...
This commit is contained in:
parent
b7c2a3dff9
commit
5dd6067c95
32 changed files with 2852 additions and 0 deletions
43
openapi-template/package.mustache
Normal file
43
openapi-template/package.mustache
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "{{npmName}}",
|
||||
"version": "{{npmVersion}}",
|
||||
"description": "OpenAPI client for {{npmName}}",
|
||||
"author": "OpenAPI-Generator",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}.git"
|
||||
},
|
||||
{{#licenseName}}
|
||||
"license": "{{licenseName}}",
|
||||
{{/licenseName}}
|
||||
{{#packageAsSourceOnlyLibrary}}
|
||||
"main": "./index.ts",
|
||||
{{/packageAsSourceOnlyLibrary}}
|
||||
{{^packageAsSourceOnlyLibrary}}
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
{{#supportsES6}}
|
||||
"module": "./dist/esm/index.js",
|
||||
"sideEffects": false,
|
||||
{{/supportsES6}}
|
||||
"scripts": {
|
||||
"build": "tsc{{#supportsES6}} && tsc -p tsconfig.esm.json{{/supportsES6}}"{{^sagasAndRecords}},
|
||||
"prepare": "npm run build"{{/sagasAndRecords}}
|
||||
},
|
||||
{{/packageAsSourceOnlyLibrary}}
|
||||
"devDependencies": {
|
||||
{{#sagasAndRecords}}
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"normalizr": "^3.6.1",
|
||||
"redux-saga": "^1.1.3",
|
||||
"redux-ts-simple": "^3.2.0",
|
||||
"reselect": "^4.0.0",
|
||||
{{/sagasAndRecords}}
|
||||
"typescript": "^4.0 || ^5.0"
|
||||
}{{#npmRepository}},{{/npmRepository}}
|
||||
{{#npmRepository}}
|
||||
"publishConfig": {
|
||||
"registry": "{{npmRepository}}"
|
||||
}
|
||||
{{/npmRepository}}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue