From 2130994511a26ec356211420d85e6e83c38ba8ac Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 11 Nov 2024 09:00:18 +0100 Subject: [PATCH 1/3] Introduce namespace-based versioning --- MaLoIdentModels/MaLoIdentModels/{ => v1}/Address.cs | 4 ++-- .../MaLoIdentModels/{ => v1}/DataControllableResource.cs | 2 +- .../MaLoIdentModels/{ => v1}/DataMarketLocation.cs | 2 +- .../{ => v1}/DataMarketLocationProperties.cs | 2 +- .../MaLoIdentModels/{ => v1}/DataMeterLocation.cs | 2 +- .../MaLoIdentModels/{ => v1}/DataNetworkLocation.cs | 2 +- .../MaLoIdentModels/{ => v1}/DataTechnicalResource.cs | 2 +- MaLoIdentModels/MaLoIdentModels/{ => v1}/DataTranche.cs | 2 +- MaLoIdentModels/MaLoIdentModels/{ => v1}/EnergyDirection.cs | 2 +- .../MaLoIdentModels/{ => v1}/GeographicCoordinates.cs | 2 +- .../MaLoIdentModels/{ => v1}/IdentificationParameter.cs | 2 +- ...IdentificationParameterIdentificationParameterAddress.cs | 2 +- .../IdentificationParameterIdentificationParameterId.cs | 2 +- MaLoIdentModels/MaLoIdentModels/{ => v1}/LandParcel.cs | 2 +- .../MaLoIdentModels/{ => v1}/MarketLocationDateTime.cs | 2 +- .../{ => v1}/MarketLocationMeasuringPointOperator.cs | 5 ++--- .../{ => v1}/MarketLocationNetworkOperator.cs | 5 ++--- .../MaLoIdentModels/{ => v1}/MarketLocationProperties.cs | 5 ++--- .../MaLoIdentModels/{ => v1}/MarketLocationProperty.cs | 2 +- .../MaLoIdentModels/{ => v1}/MarketLocationSupplier.cs | 5 ++--- .../{ => v1}/MarketLocationTransmissionSystemOperator.cs | 5 ++--- .../{ => v1}/MeasurementTechnologyClassification.cs | 2 +- .../{ => v1}/MeterLocationMeasuringPointOperator.cs | 5 ++--- MaLoIdentModels/MaLoIdentModels/{ => v1}/Name.cs | 2 +- .../{ => v1}/NetworkLocationMeasuringPointOperator.cs | 5 ++--- .../MaLoIdentModels/{ => v1}/OptionalChangeForecastBasis.cs | 2 +- MaLoIdentModels/MaLoIdentModels/{ => v1}/Proportion.cs | 2 +- MaLoIdentModels/MaLoIdentModels/v1/README.md | 3 +++ MaLoIdentModels/MaLoIdentModels/{ => v1}/ResultNegative.cs | 2 +- MaLoIdentModels/MaLoIdentModels/{ => v1}/ResultPositive.cs | 2 +- MaLoIdentModels/MaLoIdentModels/{ => v1}/SrMarketPartner.cs | 5 ++--- MaLoIdentModels/MaLoIdentModels/{ => v1}/TrancheSupplier.cs | 2 +- MaLoIdentModels/MaLoIdentModels/{ => v1}/Zone.cs | 2 +- .../{ => v1Tests}/DateTimeOffsetDeserializationTests.cs | 4 ++-- .../MaLoIdentModelsTests/{ => v1Tests}/RoundTripTests.cs | 4 ++-- .../{ => v1Tests}/examples/request.json | 0 .../{ => v1Tests}/examples/result_negative.json | 0 .../{ => v1Tests}/examples/result_positive.json | 0 README.md | 6 +++++- 39 files changed, 53 insertions(+), 54 deletions(-) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/Address.cs (95%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/DataControllableResource.cs (94%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/DataMarketLocation.cs (98%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/DataMarketLocationProperties.cs (95%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/DataMeterLocation.cs (94%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/DataNetworkLocation.cs (94%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/DataTechnicalResource.cs (89%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/DataTranche.cs (95%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/EnergyDirection.cs (91%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/GeographicCoordinates.cs (96%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/IdentificationParameter.cs (96%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/IdentificationParameterIdentificationParameterAddress.cs (95%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/IdentificationParameterIdentificationParameterId.cs (95%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/LandParcel.cs (93%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MarketLocationDateTime.cs (95%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MarketLocationMeasuringPointOperator.cs (90%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MarketLocationNetworkOperator.cs (90%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MarketLocationProperties.cs (91%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MarketLocationProperty.cs (92%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MarketLocationSupplier.cs (90%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MarketLocationTransmissionSystemOperator.cs (90%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MeasurementTechnologyClassification.cs (94%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/MeterLocationMeasuringPointOperator.cs (90%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/Name.cs (94%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/NetworkLocationMeasuringPointOperator.cs (90%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/OptionalChangeForecastBasis.cs (91%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/Proportion.cs (89%) create mode 100644 MaLoIdentModels/MaLoIdentModels/v1/README.md rename MaLoIdentModels/MaLoIdentModels/{ => v1}/ResultNegative.cs (95%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/ResultPositive.cs (96%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/SrMarketPartner.cs (90%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/TrancheSupplier.cs (94%) rename MaLoIdentModels/MaLoIdentModels/{ => v1}/Zone.cs (92%) rename MaLoIdentModels/MaLoIdentModelsTests/{ => v1Tests}/DateTimeOffsetDeserializationTests.cs (98%) rename MaLoIdentModels/MaLoIdentModelsTests/{ => v1Tests}/RoundTripTests.cs (97%) rename MaLoIdentModels/MaLoIdentModelsTests/{ => v1Tests}/examples/request.json (100%) rename MaLoIdentModels/MaLoIdentModelsTests/{ => v1Tests}/examples/result_negative.json (100%) rename MaLoIdentModels/MaLoIdentModelsTests/{ => v1Tests}/examples/result_positive.json (100%) diff --git a/MaLoIdentModels/MaLoIdentModels/Address.cs b/MaLoIdentModels/MaLoIdentModels/v1/Address.cs similarity index 95% rename from MaLoIdentModels/MaLoIdentModels/Address.cs rename to MaLoIdentModels/MaLoIdentModels/v1/Address.cs index 78eb07b..267f73f 100644 --- a/MaLoIdentModels/MaLoIdentModels/Address.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/Address.cs @@ -1,8 +1,8 @@ -namespace MaLoIdentModels; - using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; +namespace MaLoIdentModels.v1; + public class Address { [JsonIgnore] diff --git a/MaLoIdentModels/MaLoIdentModels/DataControllableResource.cs b/MaLoIdentModels/MaLoIdentModels/v1/DataControllableResource.cs similarity index 94% rename from MaLoIdentModels/MaLoIdentModels/DataControllableResource.cs rename to MaLoIdentModels/MaLoIdentModels/v1/DataControllableResource.cs index adca854..7180751 100644 --- a/MaLoIdentModels/MaLoIdentModels/DataControllableResource.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/DataControllableResource.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class DataControllableResource { diff --git a/MaLoIdentModels/MaLoIdentModels/DataMarketLocation.cs b/MaLoIdentModels/MaLoIdentModels/v1/DataMarketLocation.cs similarity index 98% rename from MaLoIdentModels/MaLoIdentModels/DataMarketLocation.cs rename to MaLoIdentModels/MaLoIdentModels/v1/DataMarketLocation.cs index df81389..a163990 100644 --- a/MaLoIdentModels/MaLoIdentModels/DataMarketLocation.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/DataMarketLocation.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class DataMarketLocation { diff --git a/MaLoIdentModels/MaLoIdentModels/DataMarketLocationProperties.cs b/MaLoIdentModels/MaLoIdentModels/v1/DataMarketLocationProperties.cs similarity index 95% rename from MaLoIdentModels/MaLoIdentModels/DataMarketLocationProperties.cs rename to MaLoIdentModels/MaLoIdentModels/v1/DataMarketLocationProperties.cs index 300323c..0e8a618 100644 --- a/MaLoIdentModels/MaLoIdentModels/DataMarketLocationProperties.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/DataMarketLocationProperties.cs @@ -2,7 +2,7 @@ using System.Text.Json.Serialization; using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class DataMarketLocationProperties { diff --git a/MaLoIdentModels/MaLoIdentModels/DataMeterLocation.cs b/MaLoIdentModels/MaLoIdentModels/v1/DataMeterLocation.cs similarity index 94% rename from MaLoIdentModels/MaLoIdentModels/DataMeterLocation.cs rename to MaLoIdentModels/MaLoIdentModels/v1/DataMeterLocation.cs index e49e02c..3cbfdbc 100644 --- a/MaLoIdentModels/MaLoIdentModels/DataMeterLocation.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/DataMeterLocation.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class DataMeterLocation { diff --git a/MaLoIdentModels/MaLoIdentModels/DataNetworkLocation.cs b/MaLoIdentModels/MaLoIdentModels/v1/DataNetworkLocation.cs similarity index 94% rename from MaLoIdentModels/MaLoIdentModels/DataNetworkLocation.cs rename to MaLoIdentModels/MaLoIdentModels/v1/DataNetworkLocation.cs index 75a12c0..5f234c9 100644 --- a/MaLoIdentModels/MaLoIdentModels/DataNetworkLocation.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/DataNetworkLocation.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class DataNetworkLocation { diff --git a/MaLoIdentModels/MaLoIdentModels/DataTechnicalResource.cs b/MaLoIdentModels/MaLoIdentModels/v1/DataTechnicalResource.cs similarity index 89% rename from MaLoIdentModels/MaLoIdentModels/DataTechnicalResource.cs rename to MaLoIdentModels/MaLoIdentModels/v1/DataTechnicalResource.cs index 14014d9..442bd6b 100644 --- a/MaLoIdentModels/MaLoIdentModels/DataTechnicalResource.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/DataTechnicalResource.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class DataTechnicalResource { diff --git a/MaLoIdentModels/MaLoIdentModels/DataTranche.cs b/MaLoIdentModels/MaLoIdentModels/v1/DataTranche.cs similarity index 95% rename from MaLoIdentModels/MaLoIdentModels/DataTranche.cs rename to MaLoIdentModels/MaLoIdentModels/v1/DataTranche.cs index 61b1997..14e1e51 100644 --- a/MaLoIdentModels/MaLoIdentModels/DataTranche.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/DataTranche.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class DataTranche { diff --git a/MaLoIdentModels/MaLoIdentModels/EnergyDirection.cs b/MaLoIdentModels/MaLoIdentModels/v1/EnergyDirection.cs similarity index 91% rename from MaLoIdentModels/MaLoIdentModels/EnergyDirection.cs rename to MaLoIdentModels/MaLoIdentModels/v1/EnergyDirection.cs index 9958978..a5b1e2b 100644 --- a/MaLoIdentModels/MaLoIdentModels/EnergyDirection.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/EnergyDirection.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public enum EnergyDirection { diff --git a/MaLoIdentModels/MaLoIdentModels/GeographicCoordinates.cs b/MaLoIdentModels/MaLoIdentModels/v1/GeographicCoordinates.cs similarity index 96% rename from MaLoIdentModels/MaLoIdentModels/GeographicCoordinates.cs rename to MaLoIdentModels/MaLoIdentModels/v1/GeographicCoordinates.cs index d9005c9..e67220d 100644 --- a/MaLoIdentModels/MaLoIdentModels/GeographicCoordinates.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/GeographicCoordinates.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class GeographicCoordinates { diff --git a/MaLoIdentModels/MaLoIdentModels/IdentificationParameter.cs b/MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameter.cs similarity index 96% rename from MaLoIdentModels/MaLoIdentModels/IdentificationParameter.cs rename to MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameter.cs index d069059..5ddf6c6 100644 --- a/MaLoIdentModels/MaLoIdentModels/IdentificationParameter.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameter.cs @@ -2,7 +2,7 @@ using System.Text.Json.Serialization; using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class IdentificationParameter { diff --git a/MaLoIdentModels/MaLoIdentModels/IdentificationParameterIdentificationParameterAddress.cs b/MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameterIdentificationParameterAddress.cs similarity index 95% rename from MaLoIdentModels/MaLoIdentModels/IdentificationParameterIdentificationParameterAddress.cs rename to MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameterIdentificationParameterAddress.cs index 96f4bdb..e5205af 100644 --- a/MaLoIdentModels/MaLoIdentModels/IdentificationParameterIdentificationParameterAddress.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameterIdentificationParameterAddress.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class IdentificationParameterIdentificationParameterAddress { diff --git a/MaLoIdentModels/MaLoIdentModels/IdentificationParameterIdentificationParameterId.cs b/MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameterIdentificationParameterId.cs similarity index 95% rename from MaLoIdentModels/MaLoIdentModels/IdentificationParameterIdentificationParameterId.cs rename to MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameterIdentificationParameterId.cs index 97e9277..aff169a 100644 --- a/MaLoIdentModels/MaLoIdentModels/IdentificationParameterIdentificationParameterId.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/IdentificationParameterIdentificationParameterId.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class IdentificationParameterIdentificationParameterId { diff --git a/MaLoIdentModels/MaLoIdentModels/LandParcel.cs b/MaLoIdentModels/MaLoIdentModels/v1/LandParcel.cs similarity index 93% rename from MaLoIdentModels/MaLoIdentModels/LandParcel.cs rename to MaLoIdentModels/MaLoIdentModels/v1/LandParcel.cs index 04a8698..bdf719a 100644 --- a/MaLoIdentModels/MaLoIdentModels/LandParcel.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/LandParcel.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class LandParcel { diff --git a/MaLoIdentModels/MaLoIdentModels/MarketLocationDateTime.cs b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationDateTime.cs similarity index 95% rename from MaLoIdentModels/MaLoIdentModels/MarketLocationDateTime.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MarketLocationDateTime.cs index d6a9f8a..8fd1642 100644 --- a/MaLoIdentModels/MaLoIdentModels/MarketLocationDateTime.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationDateTime.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class MarketLocationDateTime { diff --git a/MaLoIdentModels/MaLoIdentModels/MarketLocationMeasuringPointOperator.cs b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationMeasuringPointOperator.cs similarity index 90% rename from MaLoIdentModels/MaLoIdentModels/MarketLocationMeasuringPointOperator.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MarketLocationMeasuringPointOperator.cs index b17f3b6..ca2a11b 100644 --- a/MaLoIdentModels/MaLoIdentModels/MarketLocationMeasuringPointOperator.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationMeasuringPointOperator.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class MarketLocationMeasuringPointOperator { diff --git a/MaLoIdentModels/MaLoIdentModels/MarketLocationNetworkOperator.cs b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationNetworkOperator.cs similarity index 90% rename from MaLoIdentModels/MaLoIdentModels/MarketLocationNetworkOperator.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MarketLocationNetworkOperator.cs index d109e15..73acdfe 100644 --- a/MaLoIdentModels/MaLoIdentModels/MarketLocationNetworkOperator.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationNetworkOperator.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class MarketLocationNetworkOperator { diff --git a/MaLoIdentModels/MaLoIdentModels/MarketLocationProperties.cs b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationProperties.cs similarity index 91% rename from MaLoIdentModels/MaLoIdentModels/MarketLocationProperties.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MarketLocationProperties.cs index 45bdecb..77a26ca 100644 --- a/MaLoIdentModels/MaLoIdentModels/MarketLocationProperties.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationProperties.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class MarketLocationProperties { diff --git a/MaLoIdentModels/MaLoIdentModels/MarketLocationProperty.cs b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationProperty.cs similarity index 92% rename from MaLoIdentModels/MaLoIdentModels/MarketLocationProperty.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MarketLocationProperty.cs index 411ffdd..96c23e9 100644 --- a/MaLoIdentModels/MaLoIdentModels/MarketLocationProperty.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationProperty.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public enum MarketLocationProperty { diff --git a/MaLoIdentModels/MaLoIdentModels/MarketLocationSupplier.cs b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationSupplier.cs similarity index 90% rename from MaLoIdentModels/MaLoIdentModels/MarketLocationSupplier.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MarketLocationSupplier.cs index 750e153..fcb7ac4 100644 --- a/MaLoIdentModels/MaLoIdentModels/MarketLocationSupplier.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationSupplier.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class MarketLocationSupplier { diff --git a/MaLoIdentModels/MaLoIdentModels/MarketLocationTransmissionSystemOperator.cs b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationTransmissionSystemOperator.cs similarity index 90% rename from MaLoIdentModels/MaLoIdentModels/MarketLocationTransmissionSystemOperator.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MarketLocationTransmissionSystemOperator.cs index b11c1b3..21c5f18 100644 --- a/MaLoIdentModels/MaLoIdentModels/MarketLocationTransmissionSystemOperator.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MarketLocationTransmissionSystemOperator.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class MarketLocationTransmissionSystemOperator { diff --git a/MaLoIdentModels/MaLoIdentModels/MeasurementTechnologyClassification.cs b/MaLoIdentModels/MaLoIdentModels/v1/MeasurementTechnologyClassification.cs similarity index 94% rename from MaLoIdentModels/MaLoIdentModels/MeasurementTechnologyClassification.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MeasurementTechnologyClassification.cs index 26d9fa7..ce69c7a 100644 --- a/MaLoIdentModels/MaLoIdentModels/MeasurementTechnologyClassification.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MeasurementTechnologyClassification.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public enum MeasurementTechnologyClassification { diff --git a/MaLoIdentModels/MaLoIdentModels/MeterLocationMeasuringPointOperator.cs b/MaLoIdentModels/MaLoIdentModels/v1/MeterLocationMeasuringPointOperator.cs similarity index 90% rename from MaLoIdentModels/MaLoIdentModels/MeterLocationMeasuringPointOperator.cs rename to MaLoIdentModels/MaLoIdentModels/v1/MeterLocationMeasuringPointOperator.cs index 3a6ac47..342148a 100644 --- a/MaLoIdentModels/MaLoIdentModels/MeterLocationMeasuringPointOperator.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/MeterLocationMeasuringPointOperator.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class MeterLocationMeasuringPointOperator { diff --git a/MaLoIdentModels/MaLoIdentModels/Name.cs b/MaLoIdentModels/MaLoIdentModels/v1/Name.cs similarity index 94% rename from MaLoIdentModels/MaLoIdentModels/Name.cs rename to MaLoIdentModels/MaLoIdentModels/v1/Name.cs index ff04cae..d69adda 100644 --- a/MaLoIdentModels/MaLoIdentModels/Name.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/Name.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class Name { diff --git a/MaLoIdentModels/MaLoIdentModels/NetworkLocationMeasuringPointOperator.cs b/MaLoIdentModels/MaLoIdentModels/v1/NetworkLocationMeasuringPointOperator.cs similarity index 90% rename from MaLoIdentModels/MaLoIdentModels/NetworkLocationMeasuringPointOperator.cs rename to MaLoIdentModels/MaLoIdentModels/v1/NetworkLocationMeasuringPointOperator.cs index 5940059..4e476cb 100644 --- a/MaLoIdentModels/MaLoIdentModels/NetworkLocationMeasuringPointOperator.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/NetworkLocationMeasuringPointOperator.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class NetworkLocationMeasuringPointOperator { diff --git a/MaLoIdentModels/MaLoIdentModels/OptionalChangeForecastBasis.cs b/MaLoIdentModels/MaLoIdentModels/v1/OptionalChangeForecastBasis.cs similarity index 91% rename from MaLoIdentModels/MaLoIdentModels/OptionalChangeForecastBasis.cs rename to MaLoIdentModels/MaLoIdentModels/v1/OptionalChangeForecastBasis.cs index 6860a36..75e6215 100644 --- a/MaLoIdentModels/MaLoIdentModels/OptionalChangeForecastBasis.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/OptionalChangeForecastBasis.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public enum OptionalChangeForecastBasis { diff --git a/MaLoIdentModels/MaLoIdentModels/Proportion.cs b/MaLoIdentModels/MaLoIdentModels/v1/Proportion.cs similarity index 89% rename from MaLoIdentModels/MaLoIdentModels/Proportion.cs rename to MaLoIdentModels/MaLoIdentModels/v1/Proportion.cs index 3be07de..d7e53e3 100644 --- a/MaLoIdentModels/MaLoIdentModels/Proportion.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/Proportion.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public enum Proportion { diff --git a/MaLoIdentModels/MaLoIdentModels/v1/README.md b/MaLoIdentModels/MaLoIdentModels/v1/README.md new file mode 100644 index 0000000..3f32b2f --- /dev/null +++ b/MaLoIdentModels/MaLoIdentModels/v1/README.md @@ -0,0 +1,3 @@ +# FV2504 +Contains the data model as of April 2025. +EDI@Energy names this "v1.0.0". diff --git a/MaLoIdentModels/MaLoIdentModels/ResultNegative.cs b/MaLoIdentModels/MaLoIdentModels/v1/ResultNegative.cs similarity index 95% rename from MaLoIdentModels/MaLoIdentModels/ResultNegative.cs rename to MaLoIdentModels/MaLoIdentModels/v1/ResultNegative.cs index a606d28..df81372 100644 --- a/MaLoIdentModels/MaLoIdentModels/ResultNegative.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/ResultNegative.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class ResultNegative { diff --git a/MaLoIdentModels/MaLoIdentModels/ResultPositive.cs b/MaLoIdentModels/MaLoIdentModels/v1/ResultPositive.cs similarity index 96% rename from MaLoIdentModels/MaLoIdentModels/ResultPositive.cs rename to MaLoIdentModels/MaLoIdentModels/v1/ResultPositive.cs index 3c3e327..7c02ff3 100644 --- a/MaLoIdentModels/MaLoIdentModels/ResultPositive.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/ResultPositive.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class ResultPositive { diff --git a/MaLoIdentModels/MaLoIdentModels/SrMarketPartner.cs b/MaLoIdentModels/MaLoIdentModels/v1/SrMarketPartner.cs similarity index 90% rename from MaLoIdentModels/MaLoIdentModels/SrMarketPartner.cs rename to MaLoIdentModels/MaLoIdentModels/v1/SrMarketPartner.cs index 626ec6d..3f8212d 100644 --- a/MaLoIdentModels/MaLoIdentModels/SrMarketPartner.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/SrMarketPartner.cs @@ -1,9 +1,8 @@ using System; using System.Text.Json.Serialization; +using MaLoIdentModels.JsonSettings; -namespace MaLoIdentModels; - -using JsonSettings; +namespace MaLoIdentModels.v1; public class SrMarketPartner { diff --git a/MaLoIdentModels/MaLoIdentModels/TrancheSupplier.cs b/MaLoIdentModels/MaLoIdentModels/v1/TrancheSupplier.cs similarity index 94% rename from MaLoIdentModels/MaLoIdentModels/TrancheSupplier.cs rename to MaLoIdentModels/MaLoIdentModels/v1/TrancheSupplier.cs index 8eb5592..faf67f1 100644 --- a/MaLoIdentModels/MaLoIdentModels/TrancheSupplier.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/TrancheSupplier.cs @@ -1,7 +1,7 @@ using System; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public class TrancheSupplier { diff --git a/MaLoIdentModels/MaLoIdentModels/Zone.cs b/MaLoIdentModels/MaLoIdentModels/v1/Zone.cs similarity index 92% rename from MaLoIdentModels/MaLoIdentModels/Zone.cs rename to MaLoIdentModels/MaLoIdentModels/v1/Zone.cs index cf41b10..8a27871 100644 --- a/MaLoIdentModels/MaLoIdentModels/Zone.cs +++ b/MaLoIdentModels/MaLoIdentModels/v1/Zone.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace MaLoIdentModels; +namespace MaLoIdentModels.v1; public enum Zone { diff --git a/MaLoIdentModels/MaLoIdentModelsTests/DateTimeOffsetDeserializationTests.cs b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/DateTimeOffsetDeserializationTests.cs similarity index 98% rename from MaLoIdentModels/MaLoIdentModelsTests/DateTimeOffsetDeserializationTests.cs rename to MaLoIdentModels/MaLoIdentModelsTests/v1Tests/DateTimeOffsetDeserializationTests.cs index 42b9db6..22861dc 100644 --- a/MaLoIdentModels/MaLoIdentModelsTests/DateTimeOffsetDeserializationTests.cs +++ b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/DateTimeOffsetDeserializationTests.cs @@ -1,8 +1,8 @@ using System.Text.Json; using FluentAssertions; -using MaLoIdentModels; +using MaLoIdentModels.v1; -namespace MaLoIdentModelsTests; +namespace MaLoIdentModelsTests.v1Tests; public class DateTimeOffsetDeserializationTests { diff --git a/MaLoIdentModels/MaLoIdentModelsTests/RoundTripTests.cs b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/RoundTripTests.cs similarity index 97% rename from MaLoIdentModels/MaLoIdentModelsTests/RoundTripTests.cs rename to MaLoIdentModels/MaLoIdentModelsTests/v1Tests/RoundTripTests.cs index b8ff5a1..2a79c7d 100644 --- a/MaLoIdentModels/MaLoIdentModelsTests/RoundTripTests.cs +++ b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/RoundTripTests.cs @@ -1,7 +1,7 @@ using FluentAssertions; -using MaLoIdentModels; +using MaLoIdentModels.v1; -namespace MaLoIdentModelsTests; +namespace MaLoIdentModelsTests.v1Tests; /// /// test serialization and deserialization roundtrips diff --git a/MaLoIdentModels/MaLoIdentModelsTests/examples/request.json b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/examples/request.json similarity index 100% rename from MaLoIdentModels/MaLoIdentModelsTests/examples/request.json rename to MaLoIdentModels/MaLoIdentModelsTests/v1Tests/examples/request.json diff --git a/MaLoIdentModels/MaLoIdentModelsTests/examples/result_negative.json b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/examples/result_negative.json similarity index 100% rename from MaLoIdentModels/MaLoIdentModelsTests/examples/result_negative.json rename to MaLoIdentModels/MaLoIdentModelsTests/v1Tests/examples/result_negative.json diff --git a/MaLoIdentModels/MaLoIdentModelsTests/examples/result_positive.json b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/examples/result_positive.json similarity index 100% rename from MaLoIdentModels/MaLoIdentModelsTests/examples/result_positive.json rename to MaLoIdentModels/MaLoIdentModelsTests/v1Tests/examples/result_positive.json diff --git a/README.md b/README.md index 807fbf7..d2e1d3f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ dotnet add package MaLoIdentModels Then use it ```c# -using MaLoIdentModels; +using MaLoIdentModels.v1; // ... var myNegativeResponse = new ResultNegative() { @@ -33,6 +33,10 @@ var myJson = System.Text.Json.JsonSerializer.Serialize(myNegativeResponse); Console.Out.WriteLine(myJson); ``` +### Versioning +For each major version of the OpenAPI spec, a new namespace is created. +The version which is valid from April 2025 onwards is `v1`. + ## Why are only parts of the code autogenerated? The classes are generally based on the [MaLo Ident OpenAPI specification](https://app.swaggerhub.com/apis/edi-energy/MaLoIdent_2024-07-03/v1.0.0). From 2061be30e57c4f4367fa4117a51cb2dcbcc904ea Mon Sep 17 00:00:00 2001 From: Lint Action Date: Mon, 11 Nov 2024 08:01:16 +0000 Subject: [PATCH 2/3] Fix code style issues with Prettier --- MaLoIdentModels/MaLoIdentModels/v1/README.md | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/MaLoIdentModels/MaLoIdentModels/v1/README.md b/MaLoIdentModels/MaLoIdentModels/v1/README.md index 3f32b2f..83c7d34 100644 --- a/MaLoIdentModels/MaLoIdentModels/v1/README.md +++ b/MaLoIdentModels/MaLoIdentModels/v1/README.md @@ -1,3 +1,4 @@ # FV2504 + Contains the data model as of April 2025. EDI@Energy names this "v1.0.0". diff --git a/README.md b/README.md index d2e1d3f..bd06a3e 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Console.Out.WriteLine(myJson); ``` ### Versioning + For each major version of the OpenAPI spec, a new namespace is created. The version which is valid from April 2025 onwards is `v1`. From eefc445f45584b99503dbb99f49d77fb3c6cea4c Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 11 Nov 2024 09:05:57 +0100 Subject: [PATCH 3/3] fix file references --- .../MaLoIdentModelsTests/MaLoIdentModelsTests.csproj | 6 +++--- .../v1Tests/DateTimeOffsetDeserializationTests.cs | 4 ++-- .../MaLoIdentModelsTests/v1Tests/RoundTripTests.cs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MaLoIdentModels/MaLoIdentModelsTests/MaLoIdentModelsTests.csproj b/MaLoIdentModels/MaLoIdentModelsTests/MaLoIdentModelsTests.csproj index 618b405..633b4e4 100644 --- a/MaLoIdentModels/MaLoIdentModelsTests/MaLoIdentModelsTests.csproj +++ b/MaLoIdentModels/MaLoIdentModelsTests/MaLoIdentModelsTests.csproj @@ -23,13 +23,13 @@ - + Always - + Always - + Always diff --git a/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/DateTimeOffsetDeserializationTests.cs b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/DateTimeOffsetDeserializationTests.cs index 22861dc..5943fe9 100644 --- a/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/DateTimeOffsetDeserializationTests.cs +++ b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/DateTimeOffsetDeserializationTests.cs @@ -21,7 +21,7 @@ public void Deserializing_An_DatetimeOffset_Without_Explicit_Offset_Throws_JsonE string invalidDateTimeOffsetString ) { - var fileBody = File.ReadAllText("examples/request.json"); + var fileBody = File.ReadAllText("v1Tests/examples/request.json"); fileBody .Should() .Contain( @@ -58,7 +58,7 @@ public void Deserializing_An_DatetimeOffset_With_Explicit_Offset_Works( string dateTimeOffsetString ) { - var fileBody = File.ReadAllText("examples/request.json"); + var fileBody = File.ReadAllText("v1Tests/examples/request.json"); fileBody .Should() .Contain( diff --git a/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/RoundTripTests.cs b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/RoundTripTests.cs index 2a79c7d..230f744 100644 --- a/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/RoundTripTests.cs +++ b/MaLoIdentModels/MaLoIdentModelsTests/v1Tests/RoundTripTests.cs @@ -11,7 +11,7 @@ public class RoundTripTests [Fact] public void Test_Request() { - var fileBody = File.ReadAllText("examples/request.json"); + var fileBody = File.ReadAllText("v1Tests/examples/request.json"); var model = System.Text.Json.JsonSerializer.Deserialize(fileBody); model.Should().NotBeNull(); { @@ -28,7 +28,7 @@ public void Test_Request() [Fact] public void Test_Positive_Result() { - var fileBody = File.ReadAllText("examples/result_positive.json"); + var fileBody = File.ReadAllText("v1Tests/examples/result_positive.json"); var model = System.Text.Json.JsonSerializer.Deserialize(fileBody); model.Should().NotBeNull(); var reSererialized = System.Text.Json.JsonSerializer.Serialize(model); @@ -42,7 +42,7 @@ public void Test_Positive_Result() [Fact] public void Test_Positive_Negative() { - var fileBody = File.ReadAllText("examples/result_negative.json"); + var fileBody = File.ReadAllText("v1Tests/examples/result_negative.json"); var model = System.Text.Json.JsonSerializer.Deserialize(fileBody); model.Should().NotBeNull(); var reSererialized = System.Text.Json.JsonSerializer.Serialize(model);