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

Validate http routing object configuration. #403

Merged
merged 12 commits into from
May 1, 2019

Conversation

mikkokar
Copy link
Contributor

Add capability to validate built-in HTTP routing object configurations.
Refactor config schema validator.

@mikkokar mikkokar requested review from dvlato and kvosper and removed request for dvlato April 25, 2019 06:45

private Optional<String> message(List<String> parents, JsonNode tree) {
String fullName = Joiner.on(".").join(parents);
return Optional.of(format("Unexpected field type. Field '%s' should be MAP ('%s'), but it is %s", fullName, this.elementType().describe(), tree.getNodeType()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*Here why I decided to add the comment to remove hardcoded strings for the field type. Still a minor issue of course...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The element type can be anything. Even a nested map. For this reason the describe() is really important. If I understood your comment correctly? :-)

@mikkokar mikkokar force-pushed the refactor-styx-routing3 branch from 66fa1f5 to a251d3b Compare April 26, 2019 08:34
@mikkokar mikkokar merged commit 3ce15ca into ExpediaGroup:master May 1, 2019
@mikkokar mikkokar deleted the refactor-styx-routing3 branch May 1, 2019 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants