@team-supercharge/oasg 13.2.0-feature-csharp-functions-00ba5a99.0 → 13.2.0-feature-csharp-functions-90bc2acb.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
@@ -779,6 +779,11 @@ describe('Auth', function () {
779
779
  "type": "csharp-functions",
780
780
  "source": "source-merged",
781
781
  "packageName": "Oasg.Example",
782
+ "version": "1.0.0",
783
+ "apiUrl": "https://gitlab.supercharge.io/api/v4",
784
+ "projectId" : "1900",
785
+ "username": "gitlab-ci-token",
786
+ "password" : "token",
782
787
  "generatorCustomArgs": "--additional-properties=packageName=$packageName"
783
788
  }
784
789
  ```
@@ -786,6 +791,11 @@ describe('Auth', function () {
786
791
  |Parameter| Description| Required | Default |
787
792
  |-|-|-|-|
788
793
  | packageName | C# package name (convention: Title.Case). | Y | - |
794
+ | version | Version number of the generated package | Y | - |
795
+ | apiUrl | Url to where the package will be published | Y | - |
796
+ | projectId | The nuget source id of the project | Y | - |
797
+ | username | The username to nuget source | Y | - |
798
+ | password | The password to nuget source | Y | - |
789
799
  | generatorCustomArgs | Custom arguments of the generator | N | - |
790
800
 
791
801
  ---
package/config.schema.yml CHANGED
@@ -355,8 +355,20 @@ targets:
355
355
  pattern: '^csharp-functions$'
356
356
  packageName:
357
357
  type: string
358
+ version:
359
+ type: string
360
+ apiUrl:
361
+ type: string
362
+ projectId:
363
+ type: string
364
+ token:
365
+ type: string
358
366
  required:
359
367
  - packageName
368
+ - version
369
+ - apiUrl
370
+ - projectId
371
+ - token
360
372
 
361
373
  definitions:
362
374
  # default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-supercharge/oasg",
3
- "version": "13.2.0-feature-csharp-functions-00ba5a99.0",
3
+ "version": "13.2.0-feature-csharp-functions-90bc2acb.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,12 +1,22 @@
1
1
  #/bin/bash
2
2
 
3
- # source $(dirname "$0")/../common.sh
3
+ source $(dirname "$0")/../common.sh
4
4
 
5
5
  # TODO install dotnet, nuget
6
6
 
7
- # cd out/$targetId
8
- # dotnet pack
9
- # nuget push YourPackage.nupkg -Source https://api.nuget.org/v3/index.json
10
- # cd ../..
7
+ cd out/$targetId
11
8
 
12
- echo "Publish .NET"
9
+ # pack
10
+ dotnet restore
11
+ dotnet build -c Release
12
+ dotnet pack -c Release /p:Version=${version}
13
+
14
+ # publish
15
+ dotnet nuget add source "${apiUrl}/projects/${projectId}/packages/nuget/index.json" \
16
+ --name gitlab \
17
+ --username ${username} \
18
+ --password ${password} \
19
+ --store-password-in-clear-text
20
+ dotnet nuget push "bin/Release/*.nupkg" --source gitlab
21
+
22
+ cd ../..