@team-supercharge/oasg 14.0.0 → 14.1.0-feature-postman-target-44c6a50d.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 +12 -0
- package/bin/oasg +1 -0
- package/config.schema.yml +15 -0
- package/package.json +1 -1
- package/targets/postman/generate.sh +17 -0
- package/targets/postman/generator-config.json +7 -0
- package/targets/postman/publish.sh +26 -0
package/README.md
CHANGED
@@ -771,6 +771,18 @@ describe('Auth', function () {
|
|
771
771
|
|-|-|-|-|
|
772
772
|
| fileName | Name of the generated file | N | `openapi.yaml` |
|
773
773
|
|
774
|
+
#### `postman-collection`
|
775
|
+
|
776
|
+
```json
|
777
|
+
{
|
778
|
+
"id": "postman-collection",
|
779
|
+
"type": "postman-collection",
|
780
|
+
"source": "source-merged",
|
781
|
+
"repository": "git@gitlab.supercharge.io:example/openapi-generator-source.git",
|
782
|
+
"generatorCustomArgs": "--additional-properties=packageName=$packageName"
|
783
|
+
}
|
784
|
+
```
|
785
|
+
|
774
786
|
---
|
775
787
|
|
776
788
|
# Migration Guide
|
package/bin/oasg
CHANGED
@@ -49,6 +49,7 @@ const DEFAULT_GENERATOR_MAPPING = {
|
|
49
49
|
"contract-testing": { version: '4.3.1', generator: 'typescript-node' },
|
50
50
|
"openapi": { version: undefined, generator: undefined },
|
51
51
|
"stubby": { version: '4.3.1', generator: 'stubby' },
|
52
|
+
"postman": { version: '7.0.1', generator: 'postman-collection' }
|
52
53
|
};
|
53
54
|
const DEFAULT_KTLINT_VERSION = '1.0.0';
|
54
55
|
const BIN_FOLDER = 'out/.bin';
|
package/config.schema.yml
CHANGED
@@ -24,6 +24,7 @@ properties:
|
|
24
24
|
- $ref: '#/targets/NestJS'
|
25
25
|
- $ref: '#/targets/OpenAPI'
|
26
26
|
- $ref: '#/targets/Flutter'
|
27
|
+
- $ref: '#/targets/Postman'
|
27
28
|
required:
|
28
29
|
- targets
|
29
30
|
additionalProperties: false
|
@@ -346,6 +347,20 @@ targets:
|
|
346
347
|
- packageName
|
347
348
|
- repository
|
348
349
|
|
350
|
+
Postman:
|
351
|
+
allOf:
|
352
|
+
- $ref: '#/targets/Base'
|
353
|
+
- properties:
|
354
|
+
type:
|
355
|
+
pattern: "^postman$"
|
356
|
+
packageName:
|
357
|
+
type: string
|
358
|
+
repository:
|
359
|
+
type: string
|
360
|
+
required:
|
361
|
+
- packageName
|
362
|
+
- repository
|
363
|
+
|
349
364
|
definitions:
|
350
365
|
# default
|
351
366
|
SourceOverrides:
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@team-supercharge/oasg",
|
3
|
-
"version": "14.0.0",
|
3
|
+
"version": "14.1.0-feature-postman-target-44c6a50d.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,17 @@
|
|
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
|
+
-ppubLibrary=$packageName \
|
15
|
+
-ppubName=$packageName \
|
16
|
+
-ppubRepository=$repository \
|
17
|
+
-ppubVersion=$version $generatorCustomArgs
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#/bin/bash
|
2
|
+
|
3
|
+
source $(dirname "$0")/../common.sh
|
4
|
+
|
5
|
+
cd out
|
6
|
+
git clone $repository generator-source
|
7
|
+
rm -rf generator-source/$projectName
|
8
|
+
cp -rf $targetId/* generator-source
|
9
|
+
|
10
|
+
cd generator-source
|
11
|
+
if [ $(git status --porcelain | wc -l) -eq "0" ]; then
|
12
|
+
echo "🟢 No changes"
|
13
|
+
else
|
14
|
+
git add .
|
15
|
+
git commit -m "chore(release): $version"
|
16
|
+
|
17
|
+
if [ "$preRelease" == "false" ]; then git push; fi
|
18
|
+
|
19
|
+
tagVersion="v$version"
|
20
|
+
git tag -f $tagVersion
|
21
|
+
git push origin -f --tags
|
22
|
+
fi
|
23
|
+
|
24
|
+
cd ..
|
25
|
+
rm -rf generator-source
|
26
|
+
cd ../..
|