@team-supercharge/oasg 15.1.1 → 15.2.0-typescript-axios-4d4cb439.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
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
@@ -356,6 +356,20 @@ targets:
|
|
356
356
|
- packageName
|
357
357
|
- repository
|
358
358
|
|
359
|
+
TypeScriptAxios:
|
360
|
+
allOf:
|
361
|
+
- $ref: '#/targets/Base'
|
362
|
+
- properties:
|
363
|
+
type:
|
364
|
+
pattern: "^typescript-axios$"
|
365
|
+
packageName:
|
366
|
+
type: string
|
367
|
+
repository:
|
368
|
+
type: string
|
369
|
+
required:
|
370
|
+
- packageName
|
371
|
+
- repository
|
372
|
+
|
359
373
|
OpenAPI:
|
360
374
|
allOf:
|
361
375
|
- $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-4d4cb439.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",
|
@@ -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
|
+
}
|