Skip to content

Commit 9352d4e

Browse files
Merge pull request #416 from nclient/main
[Release] 0.12.1
2 parents f0831f1 + 462a361 commit 9352d4e

File tree

14 files changed

+54
-31
lines changed

14 files changed

+54
-31
lines changed

.github/actions/release-info/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
steps:
2525
- id: version-prefix-generator
2626
env:
27-
default-version-prefix: 0.12.0
27+
default-version-prefix: 0.12.1
2828
run: |
2929
if [[ "${{ inputs.version-prefix || '' }}" != "" ]]; then
3030
echo "::set-output name=version-prefix::${{ inputs.version-prefix }}"

.github/workflows/notifications.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: 'Notifications'
22

33
on:
44
workflow_dispatch:
5-
push:
65
pull_request:
7-
issues:
6+
types: [ opened, closed, reopened, ready_for_review, review_requested ]
7+
issues:
8+
types: [ opened, edited, deleted, closed, reopened ]
89
fork:
910
watch:
1011

@@ -14,7 +15,10 @@ jobs:
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: telegram-notify
17-
uses: cofob/telegram-actions@v1.3
18-
env:
19-
BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_API }}
20-
BOT_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
18+
uses: appleboy/telegram-action@master
19+
with:
20+
to: ${{ secrets.TELEGRAM_CHAT_ID }}
21+
token: ${{ secrets.TELEGRAM_BOT_API }}
22+
message: |
23+
Hello there,
24+
There is new ${{ github.event_name }} in NClient by ${{ github.actor }}.

.github/workflows/sonarcloud-analysis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches: [ main ]
66
pull_request:
77
types: [ assigned, review_requested, auto_merge_enabled ]
8-
branches: [ main, alpha-release, beta-release, release ]
98

109
env:
1110
solution: NClient.sln

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ dotnet tool install --global dotnet-nclient
110110
```
111111
#### Step 3: Generate the interface describing the API of the web service
112112
```
113-
dotnet nclient facade generate --api path/to/product-service-swagger.json --output MyProject/Client.cs
113+
dotnet nclient generate facade --api path/to/product-service-swagger.json --output MyProject/Client.cs
114114
```
115115
This command will generate an interface for the API using the OpenAPI (Swagger) specification:
116116
```C#

src/NClient.CodeGeneration/NClient.CodeGeneration.Facades.NSwag/CSharpFacadeGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected override IEnumerable<CodeArtifact> GenerateClientTypes(string facadeNa
3030
var notAvailableOperations = allOperations.Where(o => o.Consumes.Contains("multipart"));
3131
foreach (var notAvailableOperation in notAvailableOperations)
3232
{
33-
_logger?.LogWarning($"Multipart content currently not supported. Operation {notAvailableOperation.Summary ?? notAvailableOperation.ActualOperationName} was skipped!");
33+
_logger?.LogWarning("Multipart content currently not supported. Operation {OperationName} was skipped!", notAvailableOperation.Summary ?? notAvailableOperation.ActualOperationName);
3434
}
3535
var model = new CSharpFacadeTemplateModel(facadeDefinitionName, availableOperations, _document, (CSharpFacadeGeneratorSettings) Settings);
3636
var template = Settings.CodeGeneratorSettings.TemplateFactory.CreateTemplate("CSharp", "Facade", model);

src/NClient.CodeGeneration/NClient.CodeGeneration.Facades.NSwag/Templates/Facade.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% if GenerateFacades -%}
66
public partial interface I{{ FacadeName }}Client : I{{ FacadeName }}Facade
77
{% else %}
8-
[{{ NClientAnnotationsHttpNamespace }}.Facade]
8+
[{{ NClientAnnotationsNamespace }}.Facade]
99
{% if HasBasePath -%}
1010
[{{ NClientAnnotationsNamespace }}.Path("{{ BasePath }}")]
1111
{% endif -%}

src/NClient.Tools/NClient.DotNetTool/FacadeGenerator.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ public Task<string> GenerateAsync(InterfaceGenerationOptions generationOptions,
3030
?? (generationOptions as GenerationOptions.FacadeOptions)?.FacadeName
3131
?? "{controller}",
3232
generationOptions.Namespace,
33-
generateClients: (generationOptions as GenerationOptions.FacadeOptions)?.GenerateClients ?? false,
34-
generateFacades: (generationOptions as GenerationOptions.ClientOptions)?.GenerateFacades ?? false,
33+
generateClients: generationOptions is GenerationOptions.ClientOptions
34+
|| ((generationOptions as GenerationOptions.FacadeOptions)?.GenerateClients ?? false),
35+
generateFacades: generationOptions is GenerationOptions.FacadeOptions
36+
|| ((generationOptions as GenerationOptions.ClientOptions)?.GenerateFacades ?? false),
3537
generationOptions.UseModelValidationAttributes,
3638
generationOptions.UseNullableReferenceTypes,
3739
generationOptions.UseCancellationToken,

src/NClient.Tools/NClient.DotNetTool/Loaders/FileLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public FileLoader(string path)
1111
_path = path;
1212
}
1313

14-
public Task<string> Load()
14+
public Task<string> LoadAsync()
1515
{
1616
#if NETFRAMEWORK
1717
return Task.FromResult(File.ReadAllText(_path));

src/NClient.Tools/NClient.DotNetTool/Loaders/ISpecificationLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ namespace NClient.DotNetTool.Loaders
44
{
55
public interface ISpecificationLoader
66
{
7-
Task<string> Load();
7+
Task<string> LoadAsync();
88
}
99
}

src/NClient.Tools/NClient.DotNetTool/Loaders/NetworkLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public NetworkLoader(Uri uri)
1313
_uri = uri;
1414
}
1515

16-
public async Task<string> Load()
16+
public async Task<string> LoadAsync()
1717
{
1818
using var client = new HttpClient();
1919
using var responseMessage = await client.GetAsync(_uri);

0 commit comments

Comments
 (0)