MaLoIdentModels 0.2.16
See the version list below for details.
dotnet add package MaLoIdentModels --version 0.2.16
NuGet\Install-Package MaLoIdentModels -Version 0.2.16
<PackageReference Include="MaLoIdentModels" Version="0.2.16" />
paket add MaLoIdentModels --version 0.2.16
#r "nuget: MaLoIdentModels, 0.2.16"
// Install MaLoIdentModels as a Cake Addin #addin nuget:?package=MaLoIdentModels&version=0.2.16 // Install MaLoIdentModels as a Cake Tool #tool nuget:?package=MaLoIdentModels&version=0.2.16
MaLo Ident .NET Models
This repository contains the nuget package MaLoIdentModels
which contains C# model classes with System.Text.Json
attributes for the Marktlokation Identification API by EDI@Energy.
It (de)serializes model classes to 100% as required by EDI@Energy (this includes datetimes and enums), but provides you as a developer with strongly typed models instead of stringly typed properties that you'd have to deal with. if you used the offical OpenApi spec.
All the JSON serialization settings come out of the box, no manual settings required as long as you use STJ.
Installation and Use
Install it from nuget MaLoIdentModels:
dotnet add package MaLoIdentModels
Then use it
using MaLoIdentModels;
// ...
var myNegativeResponse = new ResultNegative()
{
DecisionTree = "E_0594",
ResponseCode = "A10",
Reason = "Ich bin ein Freitext.",
NetworkOperator = 9900987654321
};
var myJson = System.Text.Json.JsonSerializer.Serialize(myNegativeResponse);
Console.Out.WriteLine(myJson);
Why are only parts of the code autogenerated?
The classes are generally based on the MaLo Ident OpenAPI specification. But although auto-generation of code is theoretically possible, the classes are not autogenerated for multiple reasons:
- The official OpenAPI Spec has several problems. We at Hochfrequenz maintain a better version of the
openapi.yml
without all the shortcomings here: Hochfrequenz/malo-ident-python-models/openapi/openapi.yml - (Technical) We wanted to use System.Text.Json in .NET8 (and not Newtonsoft in .NET6) and did not find a a working code generator.
- We didn't want to deal with magic JsonSettings, so we manually added all JsonPropertyName attributes and JsonConverters where needed.
See also
We also maintain a Python version of this data model.
Contributing
You are very welcome to contribute to this template repository by opening a pull request against the main branch.
Hochfrequenz
Hochfrequenz Unternehmensberatung GmbH is a consulting company with offices in Berlin, Leipzig, Köln and Bremen. We're not only the main contributor to open source in the field of German utilities but, according to Kununu ratings, also among the most attractive employers within the German energy market. Applications of talented developers are welcome at any time! Please consider visiting our career page (German only).
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 is compatible. 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 is compatible. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.1
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 9.0.0-rc.2.24473.5)
-
net8.0
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 9.0.0-rc.2.24473.5)
-
net9.0
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 9.0.0-rc.2.24473.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MaLoIdentModels:
Package | Downloads |
---|---|
MaLoIdentBo4eMapper
Mapper between Marktlokation Identifikationsprozess and BO4E |
GitHub repositories
This package is not used by any popular GitHub repositories.