399 Commits

Author SHA1 Message Date
Mauro Bieg
5d140cb860 Escape reserved keywords in schema names for v2, closes #1186 2022-08-10 11:12:18 +02:00
Mauro Bieg
05db3b97f8 Escape reserved keywords in schema names for v3, closes #1186 2022-08-10 11:10:18 +02:00
kshramt
e003116fa5 Support free-form objects
> A free-form object (arbitrary property/value pairs) is defined as:
>
>     type: object
>
> This is equivalent to
>
>     type: object
>     additionalProperties: true
>
> and
>
>     type: object
>     additionalProperties: {}

https://swagger.io/docs/specification/data-models/data-types/
2022-07-27 12:51:10 +09:00
Mark Brockhoff
63f21e68c8 feat: Only add as statement if postfixModels was specified 2022-07-14 11:43:26 +02:00
Mark Brockhoff
b1a8eb003a refactor: Handle support for --postfix inside cli 2022-07-14 11:42:59 +02:00
Mark Brockhoff
504928f76a feat: Add postfixModels to generate function & rename postfix to postfixServices 2022-07-14 11:17:31 +02:00
Ferdi Koomen
32ff947dee Fix undefined request body when body === false or 0, "" in other clients 2022-06-13 21:45:26 +02:00
visortelle
1bec18e664
Fix undefined request body when body === false or 0, "". 2022-06-13 14:06:08 +03:00
Ferdi Koomen
e180ba3f15 - Updated documentation
- Fixed issue with node-fetch abort signal
2022-06-13 11:18:17 +02:00
kulczy
a5f6367f78 Prevent duplication of parameter names 2022-06-07 22:40:56 +02:00
Ferdi Koomen
73d668a85a - Added support for NodeJS 12 2022-05-31 18:49:25 +02:00
Ferdi Koomen
0ae4db4f61 - Added better support for deprecated prop 2022-05-31 17:53:03 +02:00
Ferdi Koomen
4428f85f2c - Updated test cases after EOL change
- Added request options object to ApiError
2022-05-31 12:42:13 +02:00
Ferdi Koomen
f69da7fe2c - Making sure we have a blank line at the end of the generated files 2022-05-31 11:46:48 +02:00
Ferdi Koomen
d9a7527652
Merge pull request #1037 from vrslev/type-only-axios-imports
Use type-only imports for `axios`
2022-05-31 10:53:42 +02:00
Ferdi Koomen
0dfebbdfc8
Merge pull request #1048 from huzaifahj/patch-1
Fix error TS2564
2022-05-31 10:53:04 +02:00
John Gozde
08d994c3d0
Set Content-Type in axios 2022-05-25 14:27:49 -06:00
huzaifahj
9e9c5923de
Fix error TS2564 2022-05-23 11:40:20 +01:00
Lev Vereshchagin
4867366cd5 Use type-only imports for axios
TypeScript type checker complains about imported types in clients generated for axios backend

Type-only imports: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
2022-05-03 17:22:56 +03:00
Ferdi Koomen
59254d94a9 - Upgraded dependencies
- Removed depricated enum model generation
- Fixed issue with "null" value inside comments for OpenAPI v2 enums
- Fixed issue with compatibility for latest version of Axios (0.27.x)
2022-04-26 16:25:49 +02:00
Ferdi Koomen
99bd25a3fd Remobved unused import from node-fetch example 2022-04-06 22:33:49 +02:00
Ferdi Koomen
28415a82d9 Removed private fields using new # syntax due to issues 2022-04-06 22:28:19 +02:00
Ferdi Koomen
05d5962144 Return undefined in most cases to support noImplicitReturns rule
Filter out wrong enum values
2022-04-06 22:21:06 +02:00
Ferdi Koomen
a42795517e
Merge pull request #980 from yuvalt/master
return undefined explicitly to avoid compilation errors
2022-04-06 21:18:14 +02:00
Yuval Tal
228e549b6b return undefined explicitly to avoid compilation errors 2022-03-08 11:31:50 -05:00
Philipp Katz
b7c1cbe8e5 Make BaseHttpRequest abstract
* it's not meant for instantiation anyways, right?
* it'll prevent TS compile error TS6133 when `noUnusedParameters` compiler option is enabled
2022-03-07 17:21:36 +01:00
Ferdi Koomen
fec6534b91 Fixed enum for V2
Bumped version
2022-02-25 22:25:38 +01:00
Ferdi Koomen
2f8ae47c2a - Fixed issue with non string values in x-enum flags 2022-02-25 12:19:46 +01:00
Ferdi Koomen
eedadee59e Merge branch 'master' of github.com:ferdikoomen/openapi-typescript-codegen 2022-02-25 11:47:31 +01:00
Ferdi Koomen
b32c85e4eb - Fixed quotes in enums
- Fixed better default operation name
- Fixed unittest
2022-02-25 11:47:24 +01:00
Ferdi Koomen
54d1bfef2b
Merge pull request #965 from nikopavlica/fix-dictionary-composition
Fixes a bug that prevented using complex dictionaries within compositions
2022-02-25 11:45:47 +01:00
Ferdi Koomen
ec2c712901 Switched to NPM 2022-02-11 11:34:48 +01:00
Niko Pavlica
c88f506be9 Fixes a bug that prevented using complex dictionaries within compositions. 2022-02-09 22:04:42 +01:00
Slava Obukhov
14b4906e3b Fix tests for empty model properties that are valid in OpenAPI 2022-02-09 18:33:59 +01:00
Slava Obukhov
e3421ddcd2 Add support for empty model properties that are valid in OpenAPI 2022-02-09 17:56:52 +01:00
Ferdi Koomen
fce9d907da - Minor change in import order 2022-02-07 18:21:46 +01:00
Ferdi Koomen
75a648cc4e - Added support for the Angular client with --name parameter 2022-02-07 18:16:11 +01:00
Ferdi Koomen
ba151594bc - Testing multiline descripts for params
- Made client and request vars public
2022-01-31 20:05:32 +01:00
Ferdi Koomen
58ba24e5bc - Fixed #948 2022-01-31 19:38:23 +01:00
Ferdi Koomen
5c45280bc7 - Updated example in documentation
- Updated imports of Angular request
2022-01-28 19:01:00 +01:00
Ferdi Koomen
16cc25bf1e - Updated test cases
- Fixed capture of error body in Angular
2022-01-28 10:32:50 +01:00
Ferdi Koomen
8915770ad9 - Eslint fixes 2022-01-28 00:32:16 +01:00
Ferdi Koomen
017de0e236 - Fixed whitespace 2022-01-28 00:28:56 +01:00
Ferdi Koomen
8e05e64a72 - Fixed Angular client 2022-01-28 00:19:01 +01:00
Ferdi Koomen
b7a0f8d0eb - Short notation for properties passed through constructor 2022-01-26 20:20:10 +01:00
Ferdi Koomen
c9b4b7ef1d Merge branch 'master' into feature/angular 2022-01-26 20:17:38 +01:00
Ferdi Koomen
4637325b0a - Shorter writing style for props passed in constructors
- Simplified header creation
- Made helper scripts for test more reasable
2022-01-26 20:15:50 +01:00
Ferdi Koomen
ff4544c082 - Working e2e tests 2022-01-26 19:31:51 +01:00
Ferdi Koomen
de4d115329 - Working Angular tests 2022-01-26 19:03:06 +01:00
Ferdi Koomen
896f0b624c - Working angular test environment 2022-01-26 18:15:07 +01:00