-
Notifications
You must be signed in to change notification settings - Fork 155
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
Issue #232 (HL7 2.5.1: Failure to parse ORDER group repetitions in OML_O33) #240
Issue #232 (HL7 2.5.1: Failure to parse ORDER group repetitions in OML_O33) #240
Conversation
ghost
commented
Nov 10, 2021
- Added unit test that exposes the failure to parse ORDER group repetitions.
- Added a ParserConfiguration class which holds the "non-greedy mode" setting.
- Updated MessageIterator to handle non-greedy parsing when using PipeParser.
- Updated PipeParser to hold ParserConfiguration.
…ns in OML_O33) * Added unit test that exposes the failure to parse ORDER group repetitions. * Added a ParserConfiguration class which holds the "non-greedy mode" setting. * Updated MessageIterator to handle non-greedy parsing when using PipeParser. * Updated PipeParser to hold ParserConfiguration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left a few comments for you to review.
…ng Parse instead of being provided as a constructor parameter. * Updated MessageIterator to take ParserConfiguration instead of ParserBase in its constructor. * Other minor updates from review feedback (documentation, naming, etc.) Issue nHapiNET#232
…_parse_ORDER_group_repetitions_in_OML_O33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have responded to your questions and left a few comments, resolved the previous comments where required.
Replaced call sites where null was being passed in for ParserConfiguration with the default constructed one. Issue nHapiNET#232
@milkshakeuk Thanks for taking the time to review my pull request :) |
@iangralinski-invetech no problem! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes, one more comment added.
…uration is null. Issue nHapiNET#232
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some missing ArgumentNullException xmldoc due to Chained Parse method calls.
…rConfiguration is null. Updated XML method documentation for remaining methods that can throw when the provided ParserConfiguration is null. Issue nHapiNET#232
@iangralinski-invetech is there any way we can port these 2 greedy tests from hapi just for the extra coverage. If not no pressure I can give it ago. |
This comment has been minimized.
This comment has been minimized.
I can give it a go, though it might still be a day or two until I can jump back on this. |
@iangralinski-invetech I was thinking (as you do before you fall to sleep) and I think we should change the name of e.g. services.AddControllers()
.AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = new SnakeCaseNamingPolicy()); or builder.Services.Configure<JsonOptions>(opt =>
{
opt.SerializerOptions.PropertyNamingPolicy = new SnakeCaseNamingPolicy());
}); What do you think? Happy to discuss. |
@milkshakeuk I have made an attempt at porting the 2 greedy tests from hapi. The first was relatively straightforward to translate to C#, while the second I'm not 100% sure that I've translated the intent of the test. Does it look correct to you, or have I missed something? I have also renamed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this commit its just variable and parameter names, should probably be parserOptions
.
This comment has been minimized.
This comment has been minimized.
…ad does not change based on host OS. Issue nHapiNET#232
This comment has been minimized.
This comment has been minimized.
@iangralinski-invetech I don't think it loses its intent, I suspect the empty if blocks in the hapi tests might be just there for when they get example messages for other message types greedy is applicable. |
Unit Test Results 5 files 105 suites 16s ⏱️ Results for commit a247379. |
@PhantomGrazzler I have updated the wiki with details on all the ParserOptions. |