@team-supercharge/oasg 14.0.0 → 14.1.0-feature-postman-target-c2962642.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
@@ -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-c2962642.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,7 @@
1
+ {
2
+ "inlineSchemaOptions": {
3
+ "ARRAY_ITEM_SUFFIX": "",
4
+ "MAP_ITEM_SUFFIX": "",
5
+ "SKIP_SCHEMA_REUSE": "true"
6
+ }
7
+ }
@@ -0,0 +1,25 @@
1
+ #/bin/bash
2
+
3
+ source $(dirname "$0")/../common.sh
4
+
5
+ cd out
6
+ git clone $repository generator-source
7
+ cp -rf $targetId/* generator-source
8
+
9
+ cd generator-source
10
+ if [ $(git status --porcelain | wc -l) -eq "0" ]; then
11
+ echo "🟢 No changes"
12
+ else
13
+ git add .
14
+ git commit -m "chore(release): $version"
15
+
16
+ if [ "$preRelease" == "false" ]; then git push; fi
17
+
18
+ tagVersion="v$version"
19
+ git tag -f $tagVersion
20
+ git push origin -f --tags
21
+ fi
22
+
23
+ cd ..
24
+ rm -rf generator-source
25
+ cd ../..