Skip to content

Commit

Permalink
Merge branch 'main' into feature/update-packages
Browse files Browse the repository at this point in the history
# Conflicts:
#	Dojo.Generators.Tests/Dojo.Generators.Tests.csproj
#	Dojo.OpenApiGenerator.TestWebApi/Dojo.OpenApiGenerator.TestWebApi.csproj
  • Loading branch information
GabrielBoceanu committed Apr 10, 2024
2 parents 22c39ce + 7ee8130 commit a767e77
Show file tree
Hide file tree
Showing 21 changed files with 282 additions and 2,533 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build & Push (production)

on:
push:
tags: 'v[0-9]+.[0-9]+.[0-9]+'

concurrency:
group: ${{ github.workflow }}

jobs:
build_auto_generators:
uses: dojo-engineering/github-workflows/.github/workflows/remote-payments-dotnet-basic.yaml@main
with:
area:
cloudsdk_container_cluster: production-remotepayments
cloudsdk_core_project: firefly-prod-2018
dockerfile_path: ./build/Dockerfile
namespace: Dojo.AutoGenerators
runner: ubuntu-latest
sha: ${{ github.sha }}
enable_settingsutil: false
disable_docker_build: true
disable_deployment: true
docker-only: true
nuget-package-build-and-push-only: true
service_account_key_path: firefly-dev-2018/remotepayments-nexus-key
secrets:
container_pull_key: ${{ secrets.GH_CONTAINERS_PULLER_KEY }}
build_openapi_generator:
uses: dojo-engineering/github-workflows/.github/workflows/remote-payments-dotnet-basic.yaml@main
with:
area:
cloudsdk_container_cluster: production-remotepayments
cloudsdk_core_project: firefly-prod-2018
dockerfile_path: ./build/Dockerfile
namespace: Dojo.OpenApiGenerator
runner: ubuntu-latest
sha: ${{ github.sha }}
enable_settingsutil: false
disable_docker_build: true
disable_deployment: true
docker-only: true
nuget-package-build-and-push-only: true
service_account_key_path: firefly-dev-2018/remotepayments-nexus-key
secrets:
container_pull_key: ${{ secrets.GH_CONTAINERS_PULLER_KEY }}
54 changes: 54 additions & 0 deletions .github/workflows/build-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build (staging)

on:
push:
branches:
- 'main'
- 'master'
- 'bugfix/*'
- 'feature/*'
- 'hotfix/*'
- 'release/*'
- 'task/*'
- 'migration/*'

concurrency:
group: ${{ github.workflow }}

jobs:
build_auto_generators:
uses: dojo-engineering/github-workflows/.github/workflows/remote-payments-dotnet-basic.yaml@main
with:
area:
cloudsdk_container_cluster: staging-remotepayments
cloudsdk_core_project: firefly-staging-2018
dockerfile_path: ./build/Dockerfile
namespace: Dojo.AutoGenerators
runner: ubuntu-latest
sha: ${{ github.sha }}
enable_settingsutil: false
disable_docker_build: true
disable_deployment: true
docker-only: true
nuget-package-build-and-push-only: false
service_account_key_path: firefly-dev-2018/remotepayments-nexus-key
secrets:
container_pull_key: ${{ secrets.GH_CONTAINERS_PULLER_KEY }}
build_openapi_generator:
uses: dojo-engineering/github-workflows/.github/workflows/remote-payments-dotnet-basic.yaml@main
with:
area:
cloudsdk_container_cluster: staging-remotepayments
cloudsdk_core_project: firefly-staging-2018
dockerfile_path: ./build/Dockerfile
namespace: Dojo.OpenApiGenerator
runner: ubuntu-latest
sha: ${{ github.sha }}
enable_settingsutil: false
disable_docker_build: true
disable_deployment: true
docker-only: true
nuget-package-build-and-push-only: false
service_account_key_path: firefly-dev-2018/remotepayments-nexus-key
secrets:
container_pull_key: ${{ secrets.GH_CONTAINERS_PULLER_KEY }}
4 changes: 0 additions & 4 deletions Dojo.AutoGenerators/AutoExceptionGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ public partial class {classDefinition.Name}{baseTypeDefinition}
public {classDefinition.Name}(string message, Exception innerException) : base(message, innerException)
{{
}}
protected {classDefinition.Name}(SerializationInfo info, StreamingContext context) : base(info, context)
{{
}}
}}
}}
");
Expand Down
6 changes: 3 additions & 3 deletions Dojo.AutoGenerators/Dojo.AutoGenerators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" PrivateAssets="all" GeneratePathProperty="true" />
<ProjectReference Include="../Dojo.Generators.Abstractions/Dojo.Generators.Abstractions.csproj" />
<ProjectReference Include="..\Dojo.Generators.Core\Dojo.Generators.Core.csproj" OutputItemType="Analyzer" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Dojo.Generators.Core/Dojo.Generators.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions Dojo.Generators.Tests/AutoExceptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public TestException(string message) : base(message)
public TestException(string message, Exception innerException) : base(message, innerException)
{{
}}
protected TestException(SerializationInfo info, StreamingContext context) : base(info, context)
{{
}}
}}
}}";
// Act
Expand Down
13 changes: 13 additions & 0 deletions Dojo.Generators.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{B31EDD61-3FF0-44D0-92D3-1E1B2ADFF4B7}"
ProjectSection(SolutionItems) = preProject
build\cloudbuild.yaml = build\cloudbuild.yaml
build\cloudbuild-build-only.yaml = build\cloudbuild-build-only.yaml
build\Dockerfile = build\Dockerfile
build\Dockerfile_build = build\Dockerfile_build
build\publish.sh = build\publish.sh
build\writeversion.sh = build\writeversion.sh
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{C0B68B54-F557-4B6A-A0E8-02326DF16469}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{12A8E779-D8A6-44CA-8AFE-EBD9E8896DDD}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build-production.yaml = .github\workflows\build-production.yaml
.github\workflows\build-staging.yaml = .github\workflows\build-staging.yaml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -123,6 +133,9 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{12A8E779-D8A6-44CA-8AFE-EBD9E8896DDD} = {C0B68B54-F557-4B6A-A0E8-02326DF16469}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9B312A09-A819-40F8-9F16-2B6228EB001A}
EndGlobalSection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Dojo.OpenApiGenerator.TestWebApi.Generated.Controllers.V1;
using Dojo.OpenApiGenerator.TestWebApi.Generated.Models;
using Dojo.OpenApiGenerator.TestWebApi.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using System.Threading;

namespace Dojo.OpenApiGenerator.TestWebApi.Controllers
{
Expand All @@ -18,19 +20,29 @@ public HelloWorldCustomController(IHelloWorldService helloWorldService)
}

public override Task<ActionResult<HelloFromSourceApiModel>>
HelloFromSourceActionAsync([FromQuery, BindRequired, MaxLength(5)] System.String message, [FromRoute, BindRequired] System.Int64 number)
HelloFromSourceActionAsync([FromQuery, BindRequired, MaxLength(5)] System.String message, [FromRoute, BindRequired] System.Int64 number, CancellationToken cancellationToken)
{
return base.HelloFromSourceActionAsync(message, number);
return base.HelloFromSourceActionAsync(message, number, cancellationToken);
}

protected override async Task<ActionResult<HelloFromSourceApiModel>> HelloFromSourceAsync(string message, long number)
protected override async Task<ActionResult<HelloFromSourceApiModel>> HelloFromSourceAsync(string message, long number, CancellationToken cancellationToken)
{
return Ok(await _helloWorldService.HelloFromSourceAsync(number));
return Ok(await _helloWorldService.HelloFromSourceAsync(number, cancellationToken));
}

protected override async Task<ActionResult<string>> GetHelloGenerated2Async()
protected override async Task<ActionResult<string>> GetHelloGenerated2Async(CancellationToken cancellationToken)
{
return Ok(await _helloWorldService.HelloGenerated2Async());
return Ok(await _helloWorldService.HelloGenerated2Async(cancellationToken));
}

protected override Task<ActionResult<HelloFromSourceItemsApiModel>> GetHelloGeneratePostArrayAsync(CancellationToken cancellationToken)
{
throw new System.NotImplementedException();
}

protected override Task<ActionResult<IEnumerable<HelloFromSourceApiModel>>> PostHelloGeneratePostArrayAsync(IEnumerable<HelloFromSourceApiModel> helloFromSources, CancellationToken cancellationToken)
{
throw new System.NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,56 @@
"write"
]
}
},
"/hello-generate-post-array": {
"get": {
"summary": "Your GET endpoint",
"tags": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HelloFromSourceItems"
}
}
}
}
},
"operationId": "get-hello-generate-post-array"
},
"post": {
"summary": "",
"operationId": "post-hello-generate-post-array",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HelloFromSource"
}
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HelloFromSource"
}
}
}
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -135,6 +185,16 @@
"Salut",
"Buna"
]
},
"HelloFromSourceItems": {
"title": "HelloFromSourceItems",
"x-stoplight": {
"id": "d63g7y1xtilld"
},
"type": "array",
"items": {
"$ref": "#/components/schemas/HelloFromSource"
}
}
},
"responses": {}
Expand Down
Loading

0 comments on commit a767e77

Please sign in to comment.