@team-supercharge/oasg 15.1.2-chore-update-deps-7b65b380.0 → 15.2.0-typescript-axios-41a9a301.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/bin/oasg +1 -0
- package/config.schema.yml +15 -0
- package/package.json +3 -3
- package/targets/angular/generate.sh +1 -1
- package/targets/contract-testing/generate.sh +1 -1
- package/targets/typescript-axios/generate.sh +20 -0
- package/targets/typescript-axios/generator-config.json +20 -0
- package/targets/typescript-axios/publish.sh +8 -0
package/README.md
CHANGED
@@ -123,6 +123,7 @@ The table below gives an overview of the changes (breaking, non-breaking, bug fi
|
|
123
123
|
| `kmp` |➖ |🆕 |
|
124
124
|
| `python` |➖ |🐛 |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
|
125
125
|
| `react` |🐛 |➖ |💥 |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |➖ |🆕 |
|
126
|
+
| `typescript-axios` |🆕 |
|
126
127
|
| **Server Targets** | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
|
127
128
|
| `nestjs` |💥 |➖ |💥 |✨ |➖ |➖ |🐛 |➖ |➖ |✨ |🆕 |
|
128
129
|
| `python-fastapi` |➖ |🆕 |
|
@@ -994,6 +995,23 @@ Validations from OpenAPI spec:
|
|
994
995
|
|-|-|-|-|
|
995
996
|
| fileName | Name of the generated file | N | `collection.json` |
|
996
997
|
|
998
|
+
#### `typescript-axios`
|
999
|
+
|
1000
|
+
```json
|
1001
|
+
{
|
1002
|
+
"id": "client-typescript-axios",
|
1003
|
+
"type": "typescript-axios",
|
1004
|
+
"source": "source-simple",
|
1005
|
+
"packageName": "@project/oasg-example-typescript-axios-simple",
|
1006
|
+
"repository": "https://gitlab.supercharge.io/api/v4/projects/1226/packages/npm/"
|
1007
|
+
}
|
1008
|
+
```
|
1009
|
+
|
1010
|
+
|Parameter| Description| Required | Default |
|
1011
|
+
|-|-|-|-|
|
1012
|
+
| packageName | Name of the generated NPM package | Y | - |
|
1013
|
+
| repository | URL of the NPM package registry | Y | - |
|
1014
|
+
|
997
1015
|
---
|
998
1016
|
|
999
1017
|
# Migration Guide
|
package/bin/oasg
CHANGED
@@ -44,6 +44,7 @@ const DEFAULT_GENERATOR_MAPPING = {
|
|
44
44
|
"kmp": { version: '7.8.0', generator: 'kotlin' },
|
45
45
|
"python": { version: '7.0.1', generator: 'python' },
|
46
46
|
"react": { version: '7.0.1', generator: 'typescript-fetch' },
|
47
|
+
"typescript-axios": { version: '7.11.0', generator: 'typescript-axios' },
|
47
48
|
// server targets
|
48
49
|
"nestjs": { version: '7.0.1', generator: 'typescript-angular' },
|
49
50
|
"spring": { version: '7.0.1', generator: 'spring' },
|
package/config.schema.yml
CHANGED
@@ -29,6 +29,7 @@ properties:
|
|
29
29
|
- $ref: '#/targets/Kmp'
|
30
30
|
- $ref: '#/targets/Dotnet'
|
31
31
|
- $ref: '#/targets/Postman'
|
32
|
+
- $ref: '#/targets/TypeScriptAxios'
|
32
33
|
required:
|
33
34
|
- targets
|
34
35
|
additionalProperties: false
|
@@ -356,6 +357,20 @@ targets:
|
|
356
357
|
- packageName
|
357
358
|
- repository
|
358
359
|
|
360
|
+
TypeScriptAxios:
|
361
|
+
allOf:
|
362
|
+
- $ref: '#/targets/Base'
|
363
|
+
- properties:
|
364
|
+
type:
|
365
|
+
pattern: "^typescript-axios$"
|
366
|
+
packageName:
|
367
|
+
type: string
|
368
|
+
repository:
|
369
|
+
type: string
|
370
|
+
required:
|
371
|
+
- packageName
|
372
|
+
- repository
|
373
|
+
|
359
374
|
OpenAPI:
|
360
375
|
allOf:
|
361
376
|
- $ref: '#/targets/Base'
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@team-supercharge/oasg",
|
3
|
-
"version": "15.
|
3
|
+
"version": "15.2.0-typescript-axios-41a9a301.0",
|
4
4
|
"description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
|
5
5
|
"author": "Supercharge",
|
6
6
|
"license": "MIT",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"url": "git@gitlab.com:team-supercharge/oasg.git"
|
16
16
|
},
|
17
17
|
"engines": {
|
18
|
-
"node": "^20.
|
18
|
+
"node": "^20.15",
|
19
19
|
"npm": "^10"
|
20
20
|
},
|
21
21
|
"files": [
|
@@ -31,7 +31,7 @@
|
|
31
31
|
"@redocly/cli": "1.25.11",
|
32
32
|
"@stoplight/prism-cli": "5.12.0",
|
33
33
|
"@stoplight/spectral-cli": "6.14.1",
|
34
|
-
"ajv": "^8.
|
34
|
+
"ajv": "^8.12.0",
|
35
35
|
"command-exists": "^1.2.9",
|
36
36
|
"express": "^4.18.2",
|
37
37
|
"express-http-proxy": "^1.6.3",
|
@@ -18,6 +18,6 @@ npm install
|
|
18
18
|
# This is a workaround for an issue with the angular generator. Root cause is the missing package-lock.json: https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/typescript-angular
|
19
19
|
# some of the transitive dependency has @types/node@": "*" in their package.json
|
20
20
|
# use "npm explain @types/node" in the generated folder (./out/$TARGET) to get more info
|
21
|
-
npm install --save-dev @types/node@20.
|
21
|
+
npm install --save-dev @types/node@20.15.0
|
22
22
|
npm run build
|
23
23
|
cd ../..
|
@@ -35,7 +35,7 @@ npm install
|
|
35
35
|
npm uninstall bluebird @types/bluebird
|
36
36
|
# schema validator dependencies
|
37
37
|
npm install typescript@4.2
|
38
|
-
npm install ajv@8.
|
38
|
+
npm install ajv@8.8.2 ajv-formats@2.1.1
|
39
39
|
# needed by typescript-node
|
40
40
|
npm install @types/node@8
|
41
41
|
npm run build -- --resolveJsonModule --esModuleInterop
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#/bin/bash
|
2
|
+
|
3
|
+
source $(dirname "$0")/../common.sh
|
4
|
+
|
5
|
+
rm -rf out/$targetId
|
6
|
+
mkdir -p out/$targetId
|
7
|
+
|
8
|
+
java -jar $binary generate \
|
9
|
+
-g $generatorId \
|
10
|
+
-i $openApiFile \
|
11
|
+
-t $templateDir \
|
12
|
+
-o out/$targetId \
|
13
|
+
-c $(dirname "$0")/generator-config.json \
|
14
|
+
-p "npmVersion=$version,npmName=$packageName,npmRepository=$repository" $generatorCustomArgs
|
15
|
+
|
16
|
+
cd out/$targetId
|
17
|
+
|
18
|
+
npm install
|
19
|
+
npm run build
|
20
|
+
cd ../..
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"modelPropertyNaming": "original",
|
3
|
+
"supportsES6": "true",
|
4
|
+
"providedInRoot": "true",
|
5
|
+
"ngVersion": "10.0.2",
|
6
|
+
"serviceSuffix": "Api",
|
7
|
+
"serviceFileSuffix": ".api",
|
8
|
+
"stringEnums": "true",
|
9
|
+
"enumPropertyNaming": "UPPERCASE",
|
10
|
+
"fileNaming": "kebab-case",
|
11
|
+
"useSingleRequestParameter": "false",
|
12
|
+
"sortModelPropertiesByRequiredFlag": "false",
|
13
|
+
"sortParamsByRequiredFlag": "true",
|
14
|
+
"inlineSchemaOptions": {
|
15
|
+
"ARRAY_ITEM_SUFFIX": "",
|
16
|
+
"MAP_ITEM_SUFFIX": "",
|
17
|
+
"SKIP_SCHEMA_REUSE": "true",
|
18
|
+
"RESOLVE_INLINE_ENUMS": "true"
|
19
|
+
}
|
20
|
+
}
|