Skip to content

Commit 1db770d

Browse files
authored
Merge pull request #1 from codacy/sync-fork
Sync fork, add support for split parameters and AbortSignal
2 parents eae3d99 + 00809e3 commit 1db770d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+7298
-14421
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ references:
1414
jobs:
1515
build_package:
1616
docker:
17-
- image: cimg/node:14.21
17+
- image: cimg/node:20.8
1818
working_directory: ~/workdir
1919
steps:
2020
- attach_workspace:
@@ -44,7 +44,7 @@ jobs:
4444

4545
publish_packages:
4646
docker:
47-
- image: cimg/node:14.21
47+
- image: cimg/node:20.8
4848
working_directory: ~/workdir
4949
steps:
5050
- attach_workspace:

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [ferdikoomen]

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.27.0] - 2024-01-15
5+
### Fixed
6+
- Reverted `@apidevtools/json-schema-ref-parser` to version 10.1.0
7+
8+
## [0.26.0] - 2024-01-07
9+
### Fixed
10+
- Upgraded dependencies
11+
412
## [0.25.0] - 2023-07-05
513
### Fixed
614
- Upgraded dependencies

README.md

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -59,49 +59,26 @@ $ openapi --help
5959
$ openapi --input ./spec.json --output ./generated --client xhr
6060
```
6161

62-
## Docker usage
62+
## Documentation
6363

64-
To build the Docker container, execute the following command:
6564

66-
```
67-
docker build . --tag openapi-typescript-codegen
68-
```
65+
The main documentation can be found in the [openapi-typescript-codegen/wiki](https://github.com/ferdikoomen/openapi-typescript-codegen/wiki)
6966

70-
After this is done, you can execute the CLI commands:
67+
## Sponsors
7168

72-
```
73-
docker run openapi-typescript-codegen --help
74-
docker run openapi-typescript-codegen --input sample.yaml --output client
75-
```
7669

77-
Documentation
78-
===
79-
- [Basic usage](docs/basic-usage.md)
80-
- [OpenAPI object](docs/openapi-object.md)
81-
- [Client instances](docs/client-instances.md) `--name`
82-
- [Argument vs. Object style](docs/arguments-vs-object-style.md) `--useOptions`
83-
- [Enums vs. Union types](docs/enum-vs-union-types.md) `--useUnionTypes`
84-
- [Runtime schemas](docs/runtime-schemas.md) `--exportSchemas`
85-
- [Enum with custom names and descriptions](docs/custom-enums.md)
86-
- [Nullable props (OpenAPI v2)](docs/nullable-props.md)
87-
- [Authorization](docs/authorization.md)
88-
- [External references](docs/external-references.md)
89-
- [Canceling requests](docs/canceling-requests.md)
90-
- [Custom request file](docs/custom-request-file.md)
91-
92-
Support
93-
===
94-
- [Babel support](docs/babel-support.md)
95-
- [Axios support](docs/axios-support.md)
96-
- [Angular support](docs/angular-support.md)
97-
- [Node-Fetch support](docs/node-fetch-support.md)
70+
If you or your company use the OpenAPI Typescript Codegen, please consider supporting me. By sponsoring I can free up time to give this project some love! Details can be found here: https://github.com/sponsors/ferdikoomen
71+
72+
If you're from an enterprise looking for a fully managed SDK generation, please consider our sponsor:
73+
74+
<a href="https://speakeasyapi.dev/?utm_source=ferdi+repo&utm_medium=github+sponsorship">
75+
<img alt="speakeasy" src="https://storage.googleapis.com/speakeasy-design-assets/ferdi-sponsorship.png" width="640"/>
76+
</a>
9877

9978
[npm-url]: https://npmjs.org/package/openapi-typescript-codegen
10079
[npm-image]: https://img.shields.io/npm/v/openapi-typescript-codegen.svg
10180
[license-url]: LICENSE
10281
[license-image]: http://img.shields.io/npm/l/openapi-typescript-codegen.svg
103-
[coverage-url]: https://codecov.io/gh/ferdikoomen/openapi-typescript-codegen
104-
[coverage-image]: https://img.shields.io/codecov/c/github/ferdikoomen/openapi-typescript-codegen.svg
10582
[downloads-url]: http://npm-stat.com/charts.html?package=openapi-typescript-codegen
10683
[downloads-image]: http://img.shields.io/npm/dm/openapi-typescript-codegen.svg
10784
[build-url]: https://circleci.com/gh/ferdikoomen/openapi-typescript-codegen/tree/master

bin/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const params = program
1515
.option('-c, --client <value>', 'HTTP client to generate [fetch, xhr, node, axios, angular]', 'fetch')
1616
.option('--name <value>', 'Custom client class name')
1717
.option('--useOptions', 'Use options instead of arguments')
18+
.option('--splitParameters', 'User arguments for path parameters and options for query parameters')
1819
.option('--useUnionTypes', 'Use union types instead of enums')
1920
.option('--exportCore <value>', 'Write core files to disk', true)
2021
.option('--exportServices <value>', 'Write services to disk', true)
@@ -36,6 +37,7 @@ if (OpenAPI) {
3637
httpClient: params.client,
3738
clientName: params.name,
3839
useOptions: params.useOptions,
40+
splitParameters: params.splitParameters,
3941
useUnionTypes: params.useUnionTypes,
4042
exportCore: JSON.parse(params.exportCore) === true,
4143
exportServices: JSON.parse(params.exportServices) === true,

docs/angular-support.md

Lines changed: 0 additions & 89 deletions
This file was deleted.

docs/arguments-vs-object-style.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/authorization.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/axios-support.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

docs/babel-support.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)