{"_id":"@dhoeppe/ng-openapi-gen","_rev":"4-9e65b63581f0816cfe9938cb3624e93f","name":"@dhoeppe/ng-openapi-gen","dist-tags":{"latest":"0.13.4"},"versions":{"0.13.1":{"name":"@dhoeppe/ng-openapi-gen","version":"0.13.1","license":"MIT","author":{"name":"Cyclos development team"},"description":"An OpenAPI 3 codegen for Angular 7+","keywords":["angular","openapi","codegen"],"repository":{"type":"git","url":"git+https://github.com/dhoeppe/ng-openapi-gen.git"},"private":false,"bin":{"ng-openapi-gen":"lib/index.js"},"scripts":{"test":"jasmine-ts tsconfig.json --config=jasmine.json","tslint":"tslint -c tslint.json -p tsconfig.json","compile":"tsc --project tsconfig.json && ncp \"LICENSE\" dist && ncp \"README.md\" \"dist/README.md\" && ncp \"templates\" \"dist/templates\" && ncp \"node_modules\" \"dist/node_modules\" && rimraf \"dist/test\" && replace-in-file \"\\\"private\\\": true\" \"\\\"private\\\": false\" dist/package.json","build":"npm run tslint && npm run compile && npm test","test:watch":"nodemon --watch './**/*' --exec 'npm run test'"},"dependencies":{"@loopback/openapi-v3-types":"^1.2.1","@types/argparse":"^1.0.38","@types/fs-extra":"^8.1.0","@types/jsesc":"^0.4.29","@types/json-schema":"^7.0.4","@types/lodash":"^4.14.150","@types/mkdirp":"^0.5.2","@types/node":"^12.12.37","@types/rimraf":"^2.0.4","argparse":"^1.0.10","eol":"^0.9.1","esm":"^3.2.25","fs-extra":"^8.1.0","handlebars":"^4.7.6","jsesc":"^2.5.2","json-schema":"^0.2.5","json-schema-ref-parser":"^7.1.4","lodash":"^4.17.15","mkdirp":"^0.5.5","rimraf":"^2.7.1","ts-node":"^8.10.1","typescript":"^3.8.3"},"peerDependencies":{"@angular/core":">=7.0.0","rxjs":">=6.0.0"},"devDependencies":{"@types/jasmine":"^3.5.10","jasmine":"^3.5.0","jasmine-spec-reporter":"^4.2.1","jasmine-ts":"^0.3.0","mem":"^5.1.1","ncp":"^2.0.0","nodemon":"^2.0.3","replace-in-file":"^4.3.1","tslint":"^5.20.1","typescript-parser":"^2.6.1"},"bugs":{"url":"https://github.com/dhoeppe/ng-openapi-gen/issues"},"homepage":"https://github.com/dhoeppe/ng-openapi-gen#readme","_id":"@dhoeppe/ng-openapi-gen@0.13.1","_nodeVersion":"13.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-pYG9/k5JeSofXoIY8A1rcalrMm/E22rN2eInJ/Fw6D2SvU4K+6PMLtTaKpDGYpHxEOp+wzPVbJfI3TYdJiZM+Q==","shasum":"18bebeb691495d89d096203d0a8eaf4ed05af8ea","tarball":"https://registry.npmjs.org/@dhoeppe/ng-openapi-gen/-/ng-openapi-gen-0.13.1.tgz","fileCount":61,"unpackedSize":151670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqdgPCRA9TVsSAnZWagAAi3EP/3GRfD2RIO2iZ2l3OVbO\nEeiJU77XXJzQcPnauYWf2DaBtbNbei0UzZNAn/5Z0EVyjA77nrwcIvqO5kbn\nz5U132wQplueUJG9Ivlejwt8aNh/hF5tSIJKdJxZZGSuuERvcII6pr0cpwM3\n83cDs4k5UQIXE2elZLWjD8Pj3Ft6QSe971QbfJEBpvqVteCCu6JRXJ2UcEGb\nET6N3Z/e4b1NZFkZ45poN6lJaI/YzMe/CXCdoQIwlVihAm2AkAyi8LS9CEON\n/m5iqQVOAJ8mI3yA8tQQJ7XIeVPZgJmSUMUgWcVwNplyT6b8oKN3Xa83dLeg\nEddE0meSSnKsQ1uAda5MMMEQhKcvGDNA5Td8Rbnk377akazsmgnj5dIBM7i1\nVJVPVY7s7+wkPfDRbnxZzhF9zabZqicVhuZX8zXobAzaElf89s6naOgxhLrA\nDkmLExp1jpK72HdmvqkF1DKi14vNvEULsiBJ9p3zw8LoN81FPChAy8zLXD51\n6TcIyxzuWRw4NtKGRAVl9Y3PQJU0hN96OK+ujaM7rSke4d4cHSv0Cy+kRZ+f\niFh16tIEFSukUunXBR+s29niCpMK+IoViJAcxAbl8x+NqHSZd13JNdejx70B\n7yL5BTFCh50OgaFE4oWlbRWsL8GlYm9KeYMNI+e/g3gddLnBPVHeCDu95STE\nIylB\r\n=sIXi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCee/8KV9HQOrOKloDGOGBU4M9JFpNSZCWpbkjOmb4VDQIgXqA1tX+QxfeD0Y/mqsOk/7gdi6KhO9xzEJGgkfVfs7k="}]},"_npmUser":{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"},"directories":{},"maintainers":[{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-openapi-gen_0.13.1_1604966414399_0.9968188041419719"},"_hasShrinkwrap":false},"0.13.2":{"name":"@dhoeppe/ng-openapi-gen","version":"0.13.2","license":"MIT","author":{"name":"Cyclos development team"},"description":"An OpenAPI 3 codegen for Angular 7+","keywords":["angular","openapi","codegen"],"repository":{"type":"git","url":"git+https://github.com/dhoeppe/ng-openapi-gen.git"},"private":false,"bin":{"ng-openapi-gen":"lib/index.js"},"scripts":{"test":"jasmine-ts tsconfig.json --config=jasmine.json","tslint":"tslint -c tslint.json -p tsconfig.json","compile":"tsc --project tsconfig.json && ncp \"LICENSE\" dist && ncp \"README.md\" \"dist/README.md\" && ncp \"templates\" \"dist/templates\" && ncp \"node_modules\" \"dist/node_modules\" && rimraf \"dist/test\" && replace-in-file \"\\\"private\\\": true\" \"\\\"private\\\": false\" dist/package.json","build":"npm run tslint && npm run compile && npm test","test:watch":"nodemon --watch './**/*' --exec 'npm run test'"},"dependencies":{"@loopback/openapi-v3-types":"^1.2.1","@types/argparse":"^1.0.38","@types/fs-extra":"^8.1.0","@types/jsesc":"^0.4.29","@types/json-schema":"^7.0.4","@types/lodash":"^4.14.150","@types/mkdirp":"^0.5.2","@types/node":"^12.12.37","@types/rimraf":"^2.0.4","argparse":"^1.0.10","eol":"^0.9.1","esm":"^3.2.25","fs-extra":"^8.1.0","handlebars":"^4.7.6","jsesc":"^2.5.2","json-schema":"^0.2.5","json-schema-ref-parser":"^7.1.4","lodash":"^4.17.15","mkdirp":"^0.5.5","rimraf":"^2.7.1","ts-node":"^8.10.1","typescript":"^3.8.3"},"peerDependencies":{"@angular/core":">=7.0.0","rxjs":">=6.0.0"},"devDependencies":{"@types/jasmine":"^3.5.10","jasmine":"^3.5.0","jasmine-spec-reporter":"^4.2.1","jasmine-ts":"^0.3.0","mem":"^5.1.1","ncp":"^2.0.0","nodemon":"^2.0.3","replace-in-file":"^4.3.1","tslint":"^5.20.1","typescript-parser":"^2.6.1"},"bugs":{"url":"https://github.com/dhoeppe/ng-openapi-gen/issues"},"homepage":"https://github.com/dhoeppe/ng-openapi-gen#readme","_id":"@dhoeppe/ng-openapi-gen@0.13.2","_nodeVersion":"13.7.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Dlr5PGn2YK7yOXtCJN39xR6FsHSKUWfIlXKU2dpAMxjf1ZHWJtnx2/KeP/p1zV1rNgAoP09QO/An0b/g0GiHrw==","shasum":"077533677172a515081beae3d6374e70f0aa531a","tarball":"https://registry.npmjs.org/@dhoeppe/ng-openapi-gen/-/ng-openapi-gen-0.13.2.tgz","fileCount":61,"unpackedSize":151653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8y98CRA9TVsSAnZWagAAKwoP/3U68W7okSUC44O7Xu8C\ng7BuegcSLiOYgorky3f/FWeXgaMbXmDXLDW0BBGNxAf5pZPfcgpF3yE9Uh85\nl7SxsHcD2e0l0m+3ix0z6/top2vzaWiOb8VvHnc0Dn4YOGgvznpgXV6xD7dx\nyM9duEyVSjymM0qfiTKAvU1CeagoSelooNzWIw8mmYmJQV4z13y+5RJMRmzj\nQJlQ6VU9gfBisCUId+liJLZFK0tPcNx02wkfFMZzlw9ABP9LzKJMvDEV0gXX\nmuDcimeAJuhRNCy37/pifUjsx/fNtiAb3tTYEEIY+X4RqrX6yhpk5MttzRo4\nCD3PRRh6RNENKNYt5I0CmKRAtCv7Xn1Vjs7Z3XWMvrI19OhXR0mtujSrTHHZ\nRYjl1r///KzqKdanYvAI66nb1mxpER73udg1VpzuoUNWVy43ewkEV8JWkVAj\nuDM+6ohJdwXE+k2XpFhcgibC/v2AWMHnVJFac3r6vIxjdODR1QJHwyuQalfx\nWN5gCsf4UYS6CZ8io+vNId1MLcV5ojzQYwlq4G7iid4ceCcKojFJ/XIqWji5\nSsh9DMGDVq0J7xyXcQzP1sxJYJ0FOZ3Qhs8rQ2AHU+CJ/tx/Kmbgo3KGk8PE\n00U9Iqk+be6ZLvtfJEK9PqEpRt7He4mGT8Fm7f0V5lRSjJEf7AjVSGMjB2P8\nJ7gg\r\n=nhaK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFklBdKewmjUN8JqxzpF86C2A5BkvVDjXjvdbWkHh8r3AiEA65MmYo9DeTS1liG6oT3Mwi35J7DoYnUXIkvvAI+UNIg="}]},"_npmUser":{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"},"directories":{},"maintainers":[{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-openapi-gen_0.13.2_1609772923805_0.29858023658578725"},"_hasShrinkwrap":false},"0.13.3":{"name":"@dhoeppe/ng-openapi-gen","version":"0.13.3","license":"MIT","author":{"name":"Cyclos development team"},"description":"An OpenAPI 3 codegen for Angular 7+","keywords":["angular","openapi","codegen"],"repository":{"type":"git","url":"git+https://github.com/dhoeppe/ng-openapi-gen.git"},"private":false,"bin":{"ng-openapi-gen":"lib/index.js"},"scripts":{"test":"jasmine-ts tsconfig.json --config=jasmine.json","tslint":"tslint -c tslint.json -p tsconfig.json","compile":"tsc --project tsconfig.json && ncp \"LICENSE\" dist && ncp \"README.md\" \"dist/README.md\" && ncp \"templates\" \"dist/templates\" && ncp \"node_modules\" \"dist/node_modules\" && rimraf \"dist/test\" && replace-in-file \"\\\"private\\\": true\" \"\\\"private\\\": false\" dist/package.json","build":"npm run tslint && npm run compile && npm test","test:watch":"nodemon --watch './**/*' --exec 'npm run test'"},"dependencies":{"@loopback/openapi-v3-types":"^1.2.1","@types/argparse":"^1.0.38","@types/fs-extra":"^8.1.0","@types/jsesc":"^0.4.29","@types/json-schema":"^7.0.4","@types/lodash":"^4.14.150","@types/mkdirp":"^0.5.2","@types/node":"^12.12.37","@types/rimraf":"^2.0.4","argparse":"^1.0.10","eol":"^0.9.1","esm":"^3.2.25","fs-extra":"^8.1.0","handlebars":"^4.7.6","jsesc":"^2.5.2","json-schema":"^0.2.5","json-schema-ref-parser":"^7.1.4","lodash":"^4.17.15","mkdirp":"^0.5.5","rimraf":"^2.7.1","ts-node":"^8.10.1","typescript":"^3.8.3"},"peerDependencies":{"@angular/core":">=7.0.0","rxjs":">=6.0.0"},"devDependencies":{"@types/jasmine":"^3.5.10","jasmine":"^3.5.0","jasmine-spec-reporter":"^4.2.1","jasmine-ts":"^0.3.0","mem":"^5.1.1","ncp":"^2.0.0","nodemon":"^2.0.3","replace-in-file":"^4.3.1","tslint":"^5.20.1","typescript-parser":"^2.6.1"},"bugs":{"url":"https://github.com/dhoeppe/ng-openapi-gen/issues"},"homepage":"https://github.com/dhoeppe/ng-openapi-gen#readme","_id":"@dhoeppe/ng-openapi-gen@0.13.3","_nodeVersion":"13.7.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-RnSk1OkKg9jj7TcwuDN/xiKuSz1HWlObtgWKA0epSZMz+SxyFJ+NEuQZ9lPedEEycQ/zePHiZUAHq4Do7yVbcg==","shasum":"8745ab5117148c4424281ae8aea8b80d8a702d66","tarball":"https://registry.npmjs.org/@dhoeppe/ng-openapi-gen/-/ng-openapi-gen-0.13.3.tgz","fileCount":61,"unpackedSize":151653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8zK+CRA9TVsSAnZWagAA1owP/36mDDi9UAifmPMNIOSz\no1ATayV7Jh/Nkp3z7wqmCwQhlxPaMWtuIofP2MRwOSbJbVlz9FzGpfJ303un\nZZKBxzXJph8xeRvdclvUFwGXzFTBYbkvZletxvs3jKg2yGF4Q32jn9Y0gh40\nL568Zhxuy/MHdEdO+SYKs+rReBRIGl0WVfprvJ6Z2YUjfhXPhJBtqwZWOldb\nYsKK47HTcHgihs2C73SZey69Mh9kJi5cpa7ddsJxlf8UMFT7YB8YigOfyaDx\nFR8v8Qff5kH1hR69dpILMbpFCvOscnfd+1SXPIkNnGWrHxJ2BCBNHFHCe4ex\nCXkt/XxnodHCfSoZ9kOux0iGBWQ8/GvEza1P8JI2UpTuPZSfEds7ibhL5jjt\nAyxdgpE1eXbHUuYzQ+brMBJYI16iWrL3E1FG3FaSkf5uyRB1ugwsgimwsd/Y\nJwEAhL+dsq7vlbnidXgeoyYs6x2REgGXRmbrET73yZQQUrUBGXdlTmOaq9FR\nXmQJiSbg7lva3jljYSl+/794PBWro6zHLiClqAqTUaZyFxqr6OugJjdA7Mmk\nNnHW/v7QQQlZiVs9b9okzr+y9jCaN73g31eNGdETKglHHY25FoysJDk/VuDX\nzG/kGmjMYPgO9Wo2wVglAsQKb1OnWT8CBC4Uv3VBLSkPDAlz99gJOajRZxR5\nFZDc\r\n=Bu9c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNzbfgNbF8Vk5/Ju5WgX5XTrBPXAI/hgVwvBfdAC0VhAiBW81lijBg3mKVSHu1km2hIygpjdgA+2WI3gMM83ID35w=="}]},"_npmUser":{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"},"directories":{},"maintainers":[{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-openapi-gen_0.13.3_1609773758218_0.7023161659131425"},"_hasShrinkwrap":false},"0.13.4":{"name":"@dhoeppe/ng-openapi-gen","version":"0.13.4","license":"MIT","author":{"name":"Cyclos development team"},"description":"An OpenAPI 3 codegen for Angular 7+","keywords":["angular","openapi","codegen"],"repository":{"type":"git","url":"git+https://github.com/dhoeppe/ng-openapi-gen.git"},"private":false,"bin":{"ng-openapi-gen":"lib/index.js"},"scripts":{"test":"jasmine-ts tsconfig.json --config=jasmine.json","tslint":"tslint -c tslint.json -p tsconfig.json","compile":"tsc --project tsconfig.json && ncp \"LICENSE\" dist && ncp \"README.md\" \"dist/README.md\" && ncp \"templates\" \"dist/templates\" && ncp \"node_modules\" \"dist/node_modules\" && rimraf \"dist/test\" && replace-in-file \"\\\"private\\\": true\" \"\\\"private\\\": false\" dist/package.json","build":"npm run tslint && npm run compile && npm test","test:watch":"nodemon --watch './**/*' --exec 'npm run test'"},"dependencies":{"@loopback/openapi-v3-types":"^1.2.1","@types/argparse":"^1.0.38","@types/fs-extra":"^8.1.0","@types/jsesc":"^0.4.29","@types/json-schema":"^7.0.4","@types/lodash":"^4.14.150","@types/mkdirp":"^0.5.2","@types/node":"^12.12.37","@types/rimraf":"^2.0.4","argparse":"^1.0.10","eol":"^0.9.1","esm":"^3.2.25","fs-extra":"^8.1.0","handlebars":"^4.7.6","jsesc":"^2.5.2","json-schema":"^0.2.5","json-schema-ref-parser":"^7.1.4","lodash":"^4.17.15","mkdirp":"^0.5.5","rimraf":"^2.7.1","ts-node":"^8.10.1","typescript":"^3.8.3"},"peerDependencies":{"@angular/core":">=7.0.0","rxjs":">=6.0.0"},"devDependencies":{"@types/jasmine":"^3.5.10","jasmine":"^3.5.0","jasmine-spec-reporter":"^4.2.1","jasmine-ts":"^0.3.0","mem":"^5.1.1","ncp":"^2.0.0","nodemon":"^2.0.3","replace-in-file":"^4.3.1","tslint":"^5.20.1","typescript-parser":"^2.6.1"},"bugs":{"url":"https://github.com/dhoeppe/ng-openapi-gen/issues"},"homepage":"https://github.com/dhoeppe/ng-openapi-gen#readme","_id":"@dhoeppe/ng-openapi-gen@0.13.4","_nodeVersion":"13.7.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-BZudle6xXwVdfn+ZyoHlZKagU8J4Quk7YYCGNSsEgyJSawPlI4+NhCUL/nwEf72Su8UGizJ0RmSOUuZ5JZQNqA==","shasum":"77e8c0fba433c6713610c392f6bf381cd45160e8","tarball":"https://registry.npmjs.org/@dhoeppe/ng-openapi-gen/-/ng-openapi-gen-0.13.4.tgz","fileCount":61,"unpackedSize":151653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG+ZgCRA9TVsSAnZWagAAoo0QAKHmOUY7wfjTbnPLXyY7\ndKXqMf1GhcO2MN0rqWRNg35l8pY3dFZVYB/sTffy8JUu315vTf7CqPunyUZf\ntJiZg+IGoxD21p6564LuhMsyqKiKUYH7grjglJoFIE92ZrjPOhdjLkCBWFtV\npmJ2eYazCG6N9QdsQyx57/cMvK2VDkL1/5DGL71rv6CZQJbYwx+iG7mti8z2\nU5p7YTFI6F5rs7WIs0FfzbhfzPzFjbkdeu9QKJbSpcVxywUXsDT4IS7aP8qo\n7ejJKde46Tz+IO1B4k1xMDwYhTIJwDdfw7DeZuidl0y0uuxpAr2ERrevhnwM\nYpTmszHEVE/j1pRr1s+T5fkvnbjN+arQsRWpz2bGZnpuz3JvOuASXsgxZZe5\nOzAWHa1kqIAmmzNEp0r7fjricNLf9NuBMXpUzAXxW/vpV2U5xhoIEg34u0GD\nhzcjIOZTPoVWXLqJjEM29hZCV5SNP5zTQc6THRKWK8oEc5I+aX5yBCm6UEc0\n8ucHAoCFTxnCsXFqRXJbZ99dXX9jhJoH+HqXAB5uCJ/aCZS47wyWoysImINS\nJxg4eKEBn3uvL/LOg7l2qw+R+X1aXqCZ5U5HEcvpOF7FSIFuM57E5Rl0TF4s\n+y15lwC17I5MJKVxD4hon7F1ftwSH2WSkiBNVpb6/6SHCaljAZCQgw0N/FeN\nf5ax\r\n=Isd4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOajXE4OHIjELGUMVfhYF8tyn63EQGeZH2rH+Yu0H1NAIhAJ2gF1B2j8mL6ldj37I8Q7Fvt1bbGU8UppzK5CIRUJxi"}]},"_npmUser":{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"},"directories":{},"maintainers":[{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-openapi-gen_0.13.4_1612441184009_0.5820018366458757"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-10T00:00:14.354Z","0.13.1":"2020-11-10T00:00:14.557Z","modified":"2022-04-05T04:20:47.383Z","0.13.2":"2021-01-04T15:08:43.986Z","0.13.3":"2021-01-04T15:22:38.414Z","0.13.4":"2021-02-04T12:19:44.154Z"},"maintainers":[{"name":"dhoeppe","email":"npmjs.com@danielhoeppe.com"}],"description":"An OpenAPI 3 codegen for Angular 7+","homepage":"https://github.com/dhoeppe/ng-openapi-gen#readme","keywords":["angular","openapi","codegen"],"repository":{"type":"git","url":"git+https://github.com/dhoeppe/ng-openapi-gen.git"},"author":{"name":"Cyclos development team"},"bugs":{"url":"https://github.com/dhoeppe/ng-openapi-gen/issues"},"license":"MIT","readme":"ng-openapi-gen: An OpenAPI 3 code generator for Angular\n---\n\n![Build status](https://github.com/cyclosproject/ng-openapi-gen/workflows/build/badge.svg)\n![Test status](https://github.com/cyclosproject/ng-openapi-gen/workflows/test/badge.svg)\n\nThis project is a NPM module that generates model interfaces and web service clients from an [OpenApi 3](https://www.openapis.org/) [specification](https://github.com/OAI/OpenAPI-Specification).\nThe generated classes follow the principles of [Angular](https://angular.io/).\nThe generated code is compatible with Angular 7+.\n\nFor a generator for [Swagger 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md), use [ng-swagger-gen](https://github.com/cyclosproject/ng-swagger-gen) instead.\n\n## Highlights\n\n- It should be easy to use and to integrate with Angular CLI;\n- It should support `OpenAPI` specifications in both `JSON` and `YAML` formats;\n- Each tag in the OpenAPI specification generates an Angular `@Injectable()` service;\n- An Angular `@NgModule()` is generated, which provides all services;\n- It should be easy to access the original `HttpResponse`, for example, to read headers.\n  This is achieved by generating a variant suffixed with `$Response` for each generated method;\n- `OpenAPI` supports combinations of request body and response content types.\n  For each combination, a distinct method is generated;\n- It should be possible to specify a subset of services to generate.\n  Only the models actually used by that subset should be generated;\n- It should be easy to specify a root URL for the web service endpoints;\n- Generated files should compile using strict `TypeScript` compiler flags, such as `noUnusedLocals` and `noUnusedParameters`.\n\n## Limitations\n\n- Only standard OpenAPI 3 descriptions will be generated. `ng-swagger-gen` allows several extensions, specially types from JSON schema, but they are out of scope for `ng-openapi-gen`. There is, however, support for a few [vendor extensions](#Supported_vendor_extensions);\n- Servers per operation are not supported;\n- Only the first server is used as a default root URL in the configuration;\n- No data transformation is ever performed before sending / after returning data.\n  This means that a property of type `string` and format `date-time` will always be generated as `string`, not `Date`.\n  Otherwise every API call would need to have a processing that would traverse the returned object graph before sending the request\n  to replace all date properties by `Date`. The same applies to sent requests. Such operations are out of scope for `ng-openapi-gen`;\n\n## Relationship with ng-swagger-gen\n\nThis project uses the same philosophy as [ng-swagger-gen](https://github.com/cyclosproject/ng-swagger-gen), and was built by the same team.\nWe've learned a lot with `ng-swagger-gen` and have applied all the acquired knowledge to build `ng-openapi-gen`.\n\nThere were several reasons to not build a new major version of `ng-swagger-gen` that supports `OpenAPI 3`, but instead, to create a new project.\nThe main differences between `ng-openapi-gen` and `ng-swagger-gen` are:\n\n- The first, more obvious and more important is the specification version, `OpenAPI 3` vs `Swagger 2`;\n- The generator itself is written in `TypeScript`, which should be easier to maintain;\n- There is an extensive test suite for the generator;\n- The command-line arguments are more robust, derived directly from the `JSON schema` definition for the configuration file, easily allowing to override any specific configuration on CLI.\n- Root enumerations (schemas of `type` = `string` | `number` | `integer`) can be generated as TypeScript's `enum`'s.\nThis is enabled by default. Inline enums are not, because it would require another type to be exported in the container type.\n\n## Installing and running\n\nYou may want to install `ng-openapi-gen` globally or just on your project. Here is an example for a global setup:\n\n```bash\n$ npm install -g ng-openapi-gen\n$ ng-openapi-gen --input my-api.yaml --output my-app/src/app/api\n```\n\nThis will expect the file `my-api.yaml` to be in the current directory, and will generate the files on `my-app/src/app/api`.\n\n## Configuration file and CLI arguments\n\nIf the file `ng-openapi-gen.json` exists in the current directory, it will be read. Alternatively, you can run `ng-openapi-gen --config my-config.json` (could also be `-c`) to specify a different configuration file, or even specify the input / output as `ng-openapi-gen -i input.yaml` or `ng-openapi-gen -i input.yaml -o /tmp/generation`.\nThe only required configuration property is `input`, which specified the `OpenAPI` specification file. The default `output` is `src/app/api`.\n\nFor a list with all possible configuration options, see the [JSON schema file](https://raw.githubusercontent.com/cyclosproject/ng-openapi-gen/master/ng-openapi-gen-schema.json).\nYou can also run `ng-openapi-gen --help` to see all available options.\nEach option in the JSON schema can be passed in as a CLI argument, both in camel case, like `--includeTags tag1,tag2,tag3`, or in kebab case, like `--exclude-tags tag1,tag2,tag3`.\n\nHere is an example of a configuration file:\n\n```json\n{\n  \"$schema\": \"node_modules/ng-openapi-gen/ng-openapi-gen-schema.json\",\n  \"input\": \"my-file.json\",\n  \"output\": \"out/person-place\",\n  \"ignoreUnusedModels\": false\n}\n```\n\n## Specifying the root URL / web service endpoint\n\nThe easiest way to specify a custom root URL (web service endpoint URL) is to\nuse `forRoot` method of `ApiModule` and set the `rootUrl` property from there.\n\n```typescript\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    HttpClientModule\n    ApiModule.forRoot({ rootUrl: 'https://www.example.com/api' }),\n  ],\n  bootstrap: [\n    AppComponent\n  ]\n})\nexport class AppModule { }\n```\n\nAlternatively, you can inject the `ApiConfiguration` instance in some service\nor component, such as the `AppComponent` and set the `rootUrl` property there.\n\n## Passing request headers / customizing the request\n\nTo pass request headers, such as authorization or API keys, as well as having a\ncentralized error handling, a standard\n[HttpInterceptor](https://angular.io/guide/http#intercepting-all-requests-or-responses) should\nbe used. It is basically an `@Injectable` that is called before each request,\nand can customize both requests and responses.\n\nHere is an example:\n\n```typescript\n@Injectable()\nexport class ApiInterceptor implements HttpInterceptor {\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    // Apply the headers\n    req = req.clone({\n      setHeaders: {\n        'ApiToken': '1234567890'\n      }\n    });\n\n    // Also handle errors globally\n    return next.handle(req).pipe(\n      tap(x => x, err => {\n        // Handle this err\n        console.error(`Error performing request, status code = ${err.status}`);\n      })\n    );\n  }\n}\n```\n\nThen, both the `HttpInterceptor` implementation and the injection token\n`HTTP_INTERCEPTORS` pointing to it must be provided in your application module,\nlike this:\n\n```typescript\nimport { NgModule, Provider, forwardRef } from '@angular/core';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\n\nimport { ApiInterceptor } from './api.interceptor';\n\nexport const API_INTERCEPTOR_PROVIDER: Provider = {\n  provide: HTTP_INTERCEPTORS,\n  useExisting: forwardRef(() => ApiInterceptor),\n  multi: true\n};\n\n@NgModule({\n  providers: [\n    ApiInterceptor,\n    API_INTERCEPTOR_PROVIDER\n  ]\n})\nexport class AppModule {}\n```\n\nFiner control over specific requests can also be achieved, such as:\n\n- Set the immediate next request to use a BASIC authentication for login, and\n  the subsequent ones to use a session key in another request header;\n- Set the next request to not use the default error handling, and handle errors\n  directly in the calling code.\n\nTo do so, just create another shared `@Injectable()`, for example, called\n`ApiRequestConfiguration`, which has state for such special cases. Then inject\nit on both the `HttpInterceptor` and in the client code that makes requests.\nHere is an example for such class for controlling the authentication:\n\n```typescript\nimport { Injectable } from '@angular/core';\nimport { HttpRequest } from '@angular/common/http';\n\n/**\n * Configuration for the performed HTTP requests\n */\n@Injectable()\nexport class ApiRequestConfiguration {\n  private nextAuthHeader: string;\n  private nextAuthValue: string;\n\n  /** Set to basic authentication */\n  basic(user: string, password: string): void {\n    this.nextAuthHeader = 'Authorization';\n    this.nextAuthValue = 'Basic ' + btoa(user + ':' + password);\n  }\n\n  /** Set to session key */\n  session(sessionKey: string): void {\n    this.nextAuthHeader = 'Session';\n    this.nextAuthValue = sessionKey;\n  }\n\n  /** Clear any authentication headers (to be called after logout) */\n  clear(): void {\n    this.nextAuthHeader = null;\n    this.nextAuthValue = null;\n  }\n\n  /** Apply the current authorization headers to the given request */\n  apply(req: HttpRequest<any>): HttpRequest<any> {\n    const headers = {};\n    if (this.nextAuthHeader) {\n      headers[this.nextAuthHeader] = this.nextAuthValue;\n    }\n    // Apply the headers to the request\n    return req.clone({\n      setHeaders: headers\n    });\n  }\n}\n```\n\nThen change the `ApiInterceptor` class to call the `apply` method.\nAnd, of course, add `ApiRequestConfiguration` to your module `providers` and\ninject it on your components or services.\n\n## Setting up a node script\n\nRegardless If your Angular project was generated or is managed by\n[Angular CLI](https://cli.angular.io/), or you have started your project with\nsome other seed (for example, using [webpack](https://webpack.js.org/)\ndirectly), you can setup a script to make sure the generated API classes are\nconsistent with the swagger descriptor.\n\nTo do so, create the `ng-openapi-gen.json` configuration file and add the\nfollowing `scripts` to your `package.json`:\n```json\n{\n  \"scripts\": {\n    \"ng-openapi-gen\": \"ng-openapi-gen\",\n    \"start\": \"npm run ng-openapi-gen && npm run ng -- serve\",\n    \"build\": \"npm run ng-openapi-gen && npm run ng -- build -prod\"\n  }\n}\n```\nThis way whenever you run `npm start` or `npm run build`, the API classes\nwill be generated before actually serving / building your application.\n\nAlso, if you use several configuration files, you can specify multiple times\nthe call to `ng-openapi-gen`, like:\n```json\n{\n  \"scripts\": {\n    \"ng-openapi-gen\": \"ng-openapi-gen\",\n    \"generate.api1\": \"npm run ng-openapi-gen -c api1.json\",\n    \"generate.api2\": \"npm run ng-openapi-gen -c api2.json\",\n    \"generate\": \"npm run generate.api1 && npm run generate.api2\",\n    \"start\": \"npm run generate && npm run ng -- serve\",\n    \"build\": \"npm run generate && npm run ng -- build -prod\"\n  }\n}\n```\n\n## Supported vendor extensions\n\nBesides the OpenAPI 3 specification, the following vendor extensions are supported:\n\n- `x-operation-name`: Defined in [LoopBack](https://loopback.io/doc/en/lb4/Decorators_openapi.html), this extension can be used in operations to specify the actual method name. The `operationId` is required to be unique among all tags, but with this extension, a shorter method name can be used per tag (service). Example:\n\n```yaml\npaths:\n  /users:\n    get:\n      tags:\n        - Users\n      operationId: listUsers\n      x-operation-name: list\n      # ... \n  /places:\n    get:\n      tags:\n        - Places\n      operationId: listPlaces\n      x-operation-name: list\n      # ...\n```\n\n- `x-enumNames`: Generated by [NSwag](https://github.com/RicoSuter/NSwag), this extension allows schemas which are enumerations to customize the enum names. It must be an array with the same length as the actual enum values. Example:\n\n```yaml\ncomponents:\n  schemas:\n    HttpStatusCode:\n      type: integer\n      enum:\n        - 200\n        - 404\n        - 500\n      x-enumNames:\n        - OK\n        - NOT_FOUND\n        - INTERNAL_SERVER_ERROR\n```\n\n## Developing and contributing\n\nThe generator itself is written in TypeScript. When building, the code is transpiled to JavaScript in the `dist` folder. And the `dist` folder is the one that gets published to NPM. Even to prevent publishing from the wrong path, the `package.json` file has `\"private\": true`, which gets replaced by `false` in the build process.\n\nOn the other hand, for developing / running tests, `jasmine-ts` is used, so the tests run directly from TypeScript. There's even a committed VisualStudio Code debug configuration for tests.\n\nAfter developing the changes, to `link` the module and test it with other node projects, run the following:\n\n```bash\nnpm run build\ncd dist\nnpm link\n```\n\nAt that point, the globally available ng-openapi-gen will be the one compiled to the `dist` folder.\n","readmeFilename":"README.md"}