Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-49397: Adding formatPackage to FromPruefidentifikator #155

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions EDILibrary/EdiJsonMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@
}

[Obsolete("Use strongly typed overload instead.")]
public async Task<string> CreateFromJson(string jsonInput, string pid, string formatPackage, TimeZoneInfo localTime, MAUS.Anwendungshandbuch? ahb, bool convertFromUTC = false)

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 128 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
return await CreateFromJson(jsonInput, pid, formatPackage.ToEdifactFormatVersion(), localTime, ahb, convertFromUTC);
}
public string CreateFromJsonWithTemplates(string jsonInput, string pid, EdifactFormatVersion formatPackage, string ediJsonTemplate, string createTemplate, TimeZoneInfo localTime, MAUS.Anwendungshandbuch? ahb, bool convertFromUTC = false)

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 132 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
var format = EdifactFormatHelper.FromPruefidentifikator(pid, false);
var format = EdifactFormatHelper.FromPruefidentifikator(pid, false, formatPackage);

var mappingsBody = ediJsonTemplate;

Expand All @@ -148,9 +148,9 @@
Version = version,
}, new List<string>(), createTemplate, localTime, convertFromUTC);
}
public async Task<string> CreateFromJson(string jsonInput, string pid, EdifactFormatVersion formatPackage, TimeZoneInfo localTime, MAUS.Anwendungshandbuch? ahb, bool convertFromUTC = false)

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 151 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
var format = EdifactFormatHelper.FromPruefidentifikator(pid, false);
var format = EdifactFormatHelper.FromPruefidentifikator(pid, false, formatPackage);
string jsonBody = null;
try
{
Expand Down Expand Up @@ -214,7 +214,7 @@
}
public async Task<string> CreateFromEdiJson(string jsonInput, string pid, EdifactFormatVersion formatPackage, TimeZoneInfo localTime, bool convertFromUTC = false)
{
var format = EdifactFormatHelper.FromPruefidentifikator(pid, false);
var format = EdifactFormatHelper.FromPruefidentifikator(pid, false, formatPackage);

var mappingsBody = await _loader.LoadJSONTemplate(format, formatPackage.ToLegacyVersionString(), format + ".json");

Expand Down Expand Up @@ -356,7 +356,7 @@
return leftReplaced == rightReplaced;
}

protected static bool FindMask(JArray mask, string maskKey, MAUS.SegmentGroup? ahb, Stack<string> parentPath)

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 359 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
if (mask == null)
{
Expand All @@ -378,7 +378,7 @@
}
return false;
}
protected static dynamic CreateMsgJSON(JObject input, JArray mapping, JArray mask, MAUS.SegmentGroup? ahb, List<MAUS.Segment>? segments, bool virtualChild, Stack<string> parentPath, out bool createInParent, bool convertFromUTC = false)

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (8.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (7.0.100)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / unittest (6.0.201)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / coverage

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 381 in EDILibrary/EdiJsonMapper.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
createInParent = false;
if (input == null)
Expand Down
Loading