cai.analyzers
0.21.1
dotnet add package cai.analyzers --version 0.21.1
NuGet\Install-Package cai.analyzers -Version 0.21.1
<PackageReference Include="cai.analyzers" Version="0.21.1" />
paket add cai.analyzers --version 0.21.1
#r "nuget: cai.analyzers, 0.21.1"
// Install cai.analyzers as a Cake Addin #addin nuget:?package=cai.analyzers&version=0.21.1 // Install cai.analyzers as a Cake Tool #tool nuget:?package=cai.analyzers&version=0.21.1
About
This has analyzer for CAI apis
Steps
Create a new asp.net web api project
Add HotChocolate.AspNetCore > 14.2.0, HotChocolate.Data >= 14.2.0, Wolverine > 3.4.0 and Cai.Abstraction
Setup HotChocolate and Wolverine as needed. Two helper functions have been provided - builder.addCai(...) and app.useCai(...)
Apply the attributes Rest, Query and Mutation as needed.
Apply RemoteHandler or Distributed to use Nats as the message broker in addition to Wolverine.
Apply AutoLog to log all requests.
Nats.Net#2.5.5 required
Known Issues
Due to a limitation with HotChocolate, ensure that there is at least 1 query for graphql to work.
Usage
Add the package with the following properties to cai.analyzers: OutputItemType="Analyzer" ReferenceOutputAssembly="false"
Breaking Changes
v0.20.0 is a breaking change.
- Nats.Net v2.5.5 required
- OpenTelemetry is required
Sample packages
<ItemGroup>
<PackageReference Include="HotChocolate.AspNetCore" Version="14.2.0" />
<PackageReference Include="HotChocolate.Data" Version="14.2.0" />
<PackageReference Include="NATS.Net" Version="2.5.5" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.7.0-rc.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.10.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.10.0-beta.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.10.0-beta.1" />
<PackageReference Include="Ulid" Version="1.3.4" />
<PackageReference Include="WolverineFx" Version="3.4.0" />
</ItemGroup>
Require configuration in app.config
Add the configuration below to your app.config. This is required by
"otel": {
"serviceName": "[change me]",
"activitySourceName": "[change me]",
"logs": [
{
"url": "http://localhost:4317",
"protocol": "Grpc"
},
{
"url": "console"
}
],
"traces": [
{
"url": "http://localhost:4317",
"protocol": "Grpc"
},
{
"url": "console"
}
],
"metrics": [
{
"url": "http://localhost:4317",
"protocol": "Grpc"
},
{
"url": "console"
}
],
"tags": [
{
"name": "app.name",
"value": "[change me]"
},
{
"name": "app.version",
"value": "[change me]"
}
]
},
"nats": {
"url": "nats://127.0.0.1:4222",
"username": "u",
"password": "p",
"services": {
"defaultNamespace": "DefaultNamespace"
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.21.1 | 40 | 2/1/2025 |
0.21.0 | 86 | 1/10/2025 |
0.20.0 | 63 | 1/8/2025 |
0.10.6 | 145 | 11/2/2024 |
0.10.4 | 197 | 8/5/2024 |
0.10.3 | 229 | 3/13/2024 |
0.10.2 | 289 | 3/13/2024 |
0.10.1 | 112 | 3/13/2024 |
0.10.0 | 303 | 1/29/2024 |
0.0.9 | 199 | 1/20/2024 |
0.0.8 | 105 | 1/19/2024 |
0.0.7 | 122 | 1/12/2024 |
0.0.6 | 137 | 1/5/2024 |
0.0.5 | 108 | 1/5/2024 |
0.0.4 | 105 | 1/5/2024 |
0.0.3 | 124 | 1/4/2024 |
0.0.2 | 125 | 1/1/2024 |