{"_id":"@abotteram/openapi-typescript-codegen","_rev":"1-4eadf4edbdff76a2292d06955229ff55","name":"@abotteram/openapi-typescript-codegen","dist-tags":{"latest":"0.26.0"},"versions":{"0.25.0":{"name":"@abotteram/openapi-typescript-codegen","version":"0.25.0","description":"Library that generates Typescript clients based on the OpenAPI specification.","author":{"name":"Ferdi Koomen"},"private":false,"repository":{"type":"git","url":"git+https://github.com/abotteram/openapi-typescript-codegen.git"},"license":"MIT","keywords":["openapi","swagger","generator","typescript","yaml","json","fetch","xhr","axios","angular","node"],"main":"dist/index.js","types":"types/index.d.ts","bin":{"openapi":"bin/index.js"},"scripts":{"clean":"rimraf ./dist ./test/generated ./test/e2e/generated ./samples/generated ./coverage ./node_modules/.cache","build":"rollup --config --environment NODE_ENV:development","build:watch":"rollup --config --environment NODE_ENV:development --watch","release":"rollup --config --environment NODE_ENV:production","validate":"tsc --project tsconfig.json --noEmit","run":"node ./test/index.js","test":"jest --selectProjects UNIT","test:update":"jest --selectProjects UNIT --updateSnapshot","test:watch":"jest --selectProjects UNIT --watch","test:coverage":"jest --selectProjects UNIT --coverage","test:e2e":"jest --selectProjects E2E --runInBand --verbose","eslint":"eslint .","eslint:fix":"eslint . --fix","prepare":"npm run clean && npm run release","codecov":"codecov --token=66c30c23-8954-4892-bef9-fbaed0a2e42b","docker":"docker build -t eeelenbaas/openapi-typescript-codegen ."},"dependencies":{"camelcase":"^6.3.0","commander":"^11.0.0","fs-extra":"^11.1.1","handlebars":"^4.7.7","json-schema-ref-parser":"^9.0.9"},"devDependencies":{"@angular-devkit/build-angular":"16.1.3","@angular/animations":"16.1.3","@angular/cli":"16.1.3","@angular/common":"16.1.3","@angular/compiler":"16.1.3","@angular/compiler-cli":"16.1.3","@angular/core":"16.1.3","@angular/forms":"16.1.3","@angular/platform-browser":"16.1.3","@angular/platform-browser-dynamic":"16.1.3","@angular/router":"16.1.3","@babel/cli":"7.22.6","@babel/core":"7.22.8","@babel/preset-env":"7.22.7","@babel/preset-typescript":"7.22.5","@rollup/plugin-commonjs":"25.0.2","@rollup/plugin-node-resolve":"15.1.0","@rollup/plugin-typescript":"11.1.2","@types/cross-spawn":"6.0.2","@types/express":"4.17.17","@types/fs-extra":"^11.0.1","@types/glob":"8.1.0","@types/jest":"29.5.3","@types/node":"20.4.1","@types/node-fetch":"2.6.4","@types/qs":"6.9.7","@typescript-eslint/eslint-plugin":"5.61.0","@typescript-eslint/parser":"5.62.0","abort-controller":"3.0.0","axios":"1.4.0","codecov":"3.8.3","cross-spawn":"7.0.3","eslint":"8.44.0","eslint-config-prettier":"8.8.0","eslint-plugin-prettier":"4.2.1","eslint-plugin-simple-import-sort":"10.0.0","express":"4.18.2","form-data":"4.0.0","glob":"10.3.3","jest":"29.6.1","jest-cli":"29.6.1","node-fetch":"2.6.9","prettier":"2.8.8","puppeteer":"20.8.0","qs":"6.11.2","rimraf":"5.0.1","rollup":"3.26.1","rollup-plugin-terser":"7.0.2","rxjs":"7.8.1","ts-node":"10.9.1","tslib":"2.6.0","typescript":"5.1.6","zone.js":"0.13.1"},"overrides":{"node-fetch":"2.6.9","rollup":"3.26.1","typescript":"5.1.6"},"bugs":{"url":"https://github.com/abotteram/openapi-typescript-codegen/issues"},"homepage":"https://github.com/abotteram/openapi-typescript-codegen#readme","directories":{"doc":"docs","test":"test"},"gitHead":"4a40b9b124293320bd0f0be5dd305bf3a8ca7e39","_id":"@abotteram/openapi-typescript-codegen@0.25.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-tjoUIG0GQeuQ0ZZzI/92MjT1lyLq44mDA5r558kBbyx4lk5EzOCPVQoBYQlxPp9ruCSBZzhQ/4VnCAKJyI+KhQ==","shasum":"93d6255116bff65276dfba3dbc2293d98670c12c","tarball":"https://registry.npmjs.org/@abotteram/openapi-typescript-codegen/-/openapi-typescript-codegen-0.25.0.tgz","fileCount":6,"unpackedSize":230065,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBqPM2M0/ApzRoscpN1G/ZvTrUjTJD1owxtLyb63M1xAIgRCRwBux86HGci01sAIxKqi2oiY3jfJLYP/+rqoek6Es="}]},"_npmUser":{"name":"xyfi","email":"a.botteram@gmail.com"},"maintainers":[{"name":"xyfi","email":"a.botteram@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/openapi-typescript-codegen_0.25.0_1689057178497_0.5848115433935102"},"_hasShrinkwrap":false},"0.26.0":{"name":"@abotteram/openapi-typescript-codegen","version":"0.26.0","description":"Library that generates Typescript clients based on the OpenAPI specification.","author":{"name":"Ferdi Koomen"},"private":false,"repository":{"type":"git","url":"git+https://github.com/abotteram/openapi-typescript-codegen.git"},"license":"MIT","keywords":["openapi","swagger","generator","typescript","yaml","json","fetch","xhr","axios","angular","node"],"main":"dist/index.js","types":"types/index.d.ts","bin":{"openapi":"bin/index.js"},"scripts":{"clean":"rimraf ./dist ./test/generated ./test/e2e/generated ./samples/generated ./coverage ./node_modules/.cache","build":"rollup --config --environment NODE_ENV:development","build:watch":"rollup --config --environment NODE_ENV:development --watch","release":"rollup --config --environment NODE_ENV:production","validate":"tsc --project tsconfig.json --noEmit","run":"node ./test/index.js","test":"jest --selectProjects UNIT","test:update":"jest --selectProjects UNIT --updateSnapshot","test:watch":"jest --selectProjects UNIT --watch","test:coverage":"jest --selectProjects UNIT --coverage","test:e2e":"jest --selectProjects E2E --runInBand --verbose","eslint":"eslint .","eslint:fix":"eslint . --fix","prepare":"npm run clean && npm run release","codecov":"codecov --token=66c30c23-8954-4892-bef9-fbaed0a2e42b","docker":"docker build -t eeelenbaas/openapi-typescript-codegen ."},"dependencies":{"camelcase":"^6.3.0","commander":"^11.0.0","fs-extra":"^11.1.1","handlebars":"^4.7.7","json-schema-ref-parser":"^9.0.9"},"devDependencies":{"@angular-devkit/build-angular":"16.1.3","@angular/animations":"16.1.3","@angular/cli":"16.1.3","@angular/common":"16.1.3","@angular/compiler":"16.1.3","@angular/compiler-cli":"16.1.3","@angular/core":"16.1.3","@angular/forms":"16.1.3","@angular/platform-browser":"16.1.3","@angular/platform-browser-dynamic":"16.1.3","@angular/router":"16.1.3","@babel/cli":"7.22.6","@babel/core":"7.22.8","@babel/preset-env":"7.22.7","@babel/preset-typescript":"7.22.5","@rollup/plugin-commonjs":"25.0.2","@rollup/plugin-node-resolve":"15.1.0","@rollup/plugin-typescript":"11.1.2","@types/cross-spawn":"6.0.2","@types/express":"4.17.17","@types/fs-extra":"^11.0.1","@types/glob":"8.1.0","@types/jest":"29.5.3","@types/node":"20.4.1","@types/node-fetch":"2.6.4","@types/qs":"6.9.7","@typescript-eslint/eslint-plugin":"5.61.0","@typescript-eslint/parser":"5.62.0","abort-controller":"3.0.0","axios":"1.4.0","codecov":"3.8.3","cross-spawn":"7.0.3","eslint":"8.44.0","eslint-config-prettier":"8.8.0","eslint-plugin-prettier":"4.2.1","eslint-plugin-simple-import-sort":"10.0.0","express":"4.18.2","form-data":"4.0.0","glob":"10.3.3","jest":"29.6.1","jest-cli":"29.6.1","node-fetch":"2.6.9","prettier":"2.8.8","puppeteer":"20.8.0","qs":"6.11.2","rimraf":"5.0.1","rollup":"3.26.1","rollup-plugin-terser":"7.0.2","rxjs":"7.8.1","ts-node":"10.9.1","tslib":"2.6.0","typescript":"5.1.6","zone.js":"0.13.1"},"overrides":{"node-fetch":"2.6.9","rollup":"3.26.1","typescript":"5.1.6"},"bugs":{"url":"https://github.com/abotteram/openapi-typescript-codegen/issues"},"homepage":"https://github.com/abotteram/openapi-typescript-codegen#readme","directories":{"doc":"docs","test":"test"},"gitHead":"d3be804c44d5f4f0ff58792e348e8b4c04dbe1e2","_id":"@abotteram/openapi-typescript-codegen@0.26.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-5b9jPaA+gOmW76dp6XeWzSrpp6iJYejNRt0Z7OISbSXmPKRYniRSJMi/v9lIRvKRyz2mUj6gFF5smpSaPyLrHg==","shasum":"dedd50c5502b3ba491c30a165db2e471dd3d494e","tarball":"https://registry.npmjs.org/@abotteram/openapi-typescript-codegen/-/openapi-typescript-codegen-0.26.0.tgz","fileCount":6,"unpackedSize":230243,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGebcV9UU209r6TgwsXo1YKNEUpV7nS44h9P4muPqxg+AiEAmcMQsBkLUBE+VPibYgIjXgfwI5VTIWkD+EYqv8zVeto="}]},"_npmUser":{"name":"xyfi","email":"a.botteram@gmail.com"},"maintainers":[{"name":"xyfi","email":"a.botteram@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/openapi-typescript-codegen_0.26.0_1690459651960_0.38193402516373687"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-11T06:32:58.369Z","0.25.0":"2023-07-11T06:32:58.716Z","modified":"2023-07-27T12:07:32.305Z","0.26.0":"2023-07-27T12:07:32.169Z"},"maintainers":[{"name":"xyfi","email":"a.botteram@gmail.com"}],"description":"Library that generates Typescript clients based on the OpenAPI specification.","homepage":"https://github.com/abotteram/openapi-typescript-codegen#readme","keywords":["openapi","swagger","generator","typescript","yaml","json","fetch","xhr","axios","angular","node"],"repository":{"type":"git","url":"git+https://github.com/abotteram/openapi-typescript-codegen.git"},"author":{"name":"Ferdi Koomen"},"bugs":{"url":"https://github.com/abotteram/openapi-typescript-codegen/issues"},"license":"MIT","readme":"# OpenAPI Typescript Codegen\n\n[![NPM][npm-image]][npm-url]\n[![License][license-image]][license-url]\n[![Coverage][coverage-image]][coverage-url]\n[![Coverage][coverage-image]][coverage-url]\n[![Downloads][downloads-image]][downloads-url]\n[![Build][build-image]][build-url]\n\n> Node.js library that generates Typescript clients based on the OpenAPI specification.\n\n## Why?\n- Frontend ❤️ OpenAPI, but we do not want to use JAVA codegen in our builds\n- Quick, lightweight, robust and framework-agnostic 🚀\n- Supports generation of TypeScript clients\n- Supports generations of Fetch, Node-Fetch, Axios, Angular and XHR http clients\n- Supports OpenAPI specification v2.0 and v3.0\n- Supports JSON and YAML files for input\n- Supports generation through CLI, Node.js and NPX\n- Supports tsc and @babel/plugin-transform-typescript\n- Supports aborting of requests (cancelable promise pattern)\n- Supports external references using [json-schema-ref-parser](https://github.com/APIDevTools/json-schema-ref-parser/)\n\n## Install\n\n```\nnpm install openapi-typescript-codegen --save-dev\n```\n\n## Usage\n\n```\n$ openapi --help\n\n  Usage: openapi [options]\n\n  Options:\n    -V, --version             output the version number\n    -i, --input <value>       OpenAPI specification, can be a path, url or string content (required)\n    -o, --output <value>      Output directory (required)\n    -c, --client <value>      HTTP client to generate [fetch, xhr, node, axios, angular] (default: \"fetch\")\n    --name <value>            Custom client class name\n    --useOptions              Use options instead of arguments\n    --useUnionTypes           Use union types instead of enums\n    --exportCore <value>      Write core files to disk (default: true)\n    --exportServices <value>  Write services to disk (default: true)\n    --exportModels <value>    Write models to disk (default: true)\n    --exportSchemas <value>   Write schemas to disk (default: false)\n    --indent <value>          Indentation options [4, 2, tab] (default: \"4\")\n    --postfixServices         Service name postfix (default: \"Service\")\n    --postfixModels           Model name postfix\n    --request <value>         Path to custom request file\n    -h, --help                display help for command\n\n  Examples\n    $ openapi --input ./spec.json --output ./generated\n    $ openapi --input ./spec.json --output ./generated --client xhr\n```\n\n## Docker usage\n\nTo build the Docker container, execute the following command:\n\n```\ndocker build . --tag openapi-typescript-codegen\n```\n\nAfter this is done, you can execute the CLI commands:\n\n```\ndocker run openapi-typescript-codegen --help\ndocker run openapi-typescript-codegen --input sample.yaml --output client\n```\n\nDocumentation\n===\n- [Basic usage](docs/basic-usage.md)\n- [OpenAPI object](docs/openapi-object.md)\n- [Client instances](docs/client-instances.md) `--name`\n- [Argument vs. Object style](docs/arguments-vs-object-style.md) `--useOptions`\n- [Enums vs. Union types](docs/enum-vs-union-types.md) `--useUnionTypes`\n- [Runtime schemas](docs/runtime-schemas.md) `--exportSchemas`\n- [Enum with custom names and descriptions](docs/custom-enums.md)\n- [Nullable props (OpenAPI v2)](docs/nullable-props.md)\n- [Authorization](docs/authorization.md)\n- [External references](docs/external-references.md)\n- [Canceling requests](docs/canceling-requests.md)\n- [Custom request file](docs/custom-request-file.md)\n\nSupport\n===\n- [Babel support](docs/babel-support.md)\n- [Axios support](docs/axios-support.md)\n- [Angular support](docs/angular-support.md)\n- [Node-Fetch support](docs/node-fetch-support.md)\n\n[npm-url]: https://npmjs.org/package/openapi-typescript-codegen\n[npm-image]: https://img.shields.io/npm/v/openapi-typescript-codegen.svg\n[license-url]: LICENSE\n[license-image]: http://img.shields.io/npm/l/openapi-typescript-codegen.svg\n[coverage-url]: https://codecov.io/gh/ferdikoomen/openapi-typescript-codegen\n[coverage-image]: https://img.shields.io/codecov/c/github/ferdikoomen/openapi-typescript-codegen.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=openapi-typescript-codegen\n[downloads-image]: http://img.shields.io/npm/dm/openapi-typescript-codegen.svg\n[build-url]: https://circleci.com/gh/ferdikoomen/openapi-typescript-codegen/tree/master\n[build-image]: https://circleci.com/gh/ferdikoomen/openapi-typescript-codegen/tree/master.svg?style=svg\n","readmeFilename":"README.md"}