@team-supercharge/oasg 14.1.0-feature-postman-target-44c6a50d.0 → 14.1.0-feature-csharp-function-fix-d1f955c3.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 +11 -4
- package/bin/oasg +1 -1
- package/config.schema.yml +8 -8
- package/package.json +1 -1
- package/targets/{postman → dotnet}/generate.sh +3 -5
- package/targets/dotnet/publish.sh +23 -0
- package/targets/postman/publish.sh +0 -26
- /package/targets/{postman → dotnet}/generator-config.json +0 -0
package/README.md
CHANGED
@@ -771,18 +771,25 @@ describe('Auth', function () {
|
|
771
771
|
|-|-|-|-|
|
772
772
|
| fileName | Name of the generated file | N | `openapi.yaml` |
|
773
773
|
|
774
|
-
#### `
|
774
|
+
#### `dotnet`
|
775
775
|
|
776
776
|
```json
|
777
777
|
{
|
778
|
-
"id": "
|
779
|
-
"type": "
|
778
|
+
"id": "dotnet",
|
779
|
+
"type": "dotnet",
|
780
780
|
"source": "source-merged",
|
781
|
-
"
|
781
|
+
"sourceUrl": "https://api.nuget.org/v3/index.json",
|
782
|
+
"apiKey": "apiKey",
|
782
783
|
"generatorCustomArgs": "--additional-properties=packageName=$packageName"
|
783
784
|
}
|
784
785
|
```
|
785
786
|
|
787
|
+
|Parameter| Description| Required | Default |
|
788
|
+
|-|-|-|-|
|
789
|
+
| sourceUrl | Url to where the package will be published | Y | - |
|
790
|
+
| apiKey | Apikey of nuget source | Y | - |
|
791
|
+
| generatorCustomArgs | Custom arguments of the generator | N | - |
|
792
|
+
|
786
793
|
---
|
787
794
|
|
788
795
|
# Migration Guide
|
package/bin/oasg
CHANGED
@@ -45,11 +45,11 @@ const DEFAULT_GENERATOR_MAPPING = {
|
|
45
45
|
"nestjs": { version: '7.0.1', generator: 'typescript-angular' },
|
46
46
|
"spring": { version: '7.0.1', generator: 'spring' },
|
47
47
|
"spring-kotlin": { version: '7.0.1', generator: 'kotlin-spring' },
|
48
|
+
"dotnet": { version: '7.8.0', generator: 'csharp-functions' },
|
48
49
|
// misc targets
|
49
50
|
"contract-testing": { version: '4.3.1', generator: 'typescript-node' },
|
50
51
|
"openapi": { version: undefined, generator: undefined },
|
51
52
|
"stubby": { version: '4.3.1', generator: 'stubby' },
|
52
|
-
"postman": { version: '7.0.1', generator: 'postman-collection' }
|
53
53
|
};
|
54
54
|
const DEFAULT_KTLINT_VERSION = '1.0.0';
|
55
55
|
const BIN_FOLDER = 'out/.bin';
|
package/config.schema.yml
CHANGED
@@ -24,7 +24,7 @@ properties:
|
|
24
24
|
- $ref: '#/targets/NestJS'
|
25
25
|
- $ref: '#/targets/OpenAPI'
|
26
26
|
- $ref: '#/targets/Flutter'
|
27
|
-
- $ref: '#/targets/
|
27
|
+
- $ref: '#/targets/CsharpFunctions'
|
28
28
|
required:
|
29
29
|
- targets
|
30
30
|
additionalProperties: false
|
@@ -347,19 +347,19 @@ targets:
|
|
347
347
|
- packageName
|
348
348
|
- repository
|
349
349
|
|
350
|
-
|
350
|
+
CsharpFunctions:
|
351
351
|
allOf:
|
352
352
|
- $ref: '#/targets/Base'
|
353
353
|
- properties:
|
354
354
|
type:
|
355
|
-
pattern:
|
356
|
-
|
357
|
-
type: string
|
358
|
-
repository:
|
355
|
+
pattern: '^dotnet$'
|
356
|
+
sourceUrl:
|
359
357
|
type: string
|
358
|
+
apiKey:
|
359
|
+
type: string
|
360
360
|
required:
|
361
|
-
-
|
362
|
-
-
|
361
|
+
- sourceUrl
|
362
|
+
- apiKey
|
363
363
|
|
364
364
|
definitions:
|
365
365
|
# default
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@team-supercharge/oasg",
|
3
|
-
"version": "14.1.0-feature-
|
3
|
+
"version": "14.1.0-feature-csharp-function-fix-d1f955c3.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",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#!/bin/bash
|
2
2
|
|
3
3
|
source $(dirname "$0")/../common.sh
|
4
4
|
|
@@ -11,7 +11,5 @@ java -jar $binary generate \
|
|
11
11
|
-t $templateDir \
|
12
12
|
-o out/$targetId \
|
13
13
|
-c $(dirname "$0")/generator-config.json \
|
14
|
-
-
|
15
|
-
|
16
|
-
-ppubRepository=$repository \
|
17
|
-
-ppubVersion=$version $generatorCustomArgs
|
14
|
+
-p "packageVersion=$version,packageName=$packageName" \
|
15
|
+
$generatorCustomArgs
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
source $(dirname "$0")/../common.sh
|
4
|
+
|
5
|
+
cd out/$targetId
|
6
|
+
|
7
|
+
# pack
|
8
|
+
dotnet restore
|
9
|
+
dotnet build -c Release
|
10
|
+
dotnet pack -c Release -p:Version=$version -p:IsPackable=true
|
11
|
+
|
12
|
+
isWindows=false
|
13
|
+
if [[ "$OSTYPE" == "cygwin"* ]] || [[ "$OSTYPE" == "msys"* ]]; then
|
14
|
+
isWindows=true
|
15
|
+
fi
|
16
|
+
storePasswordOption=$([[ $isWindows == true ]] && echo "" || echo "--store-password-in-clear-text")
|
17
|
+
|
18
|
+
# publish
|
19
|
+
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><configuration></configuration>" > nuget.config
|
20
|
+
dotnet nuget add source "${sourceUrl}" -n Feed -u User -p "${apiKey}" --configfile nuget.config $storePasswordOption
|
21
|
+
dotnet nuget push "src/**/bin/Release/*.nupkg" -s ${sourceUrl} -k AZ
|
22
|
+
|
23
|
+
cd ../..
|
@@ -1,26 +0,0 @@
|
|
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 ../..
|
File without changes
|