-
Notifications
You must be signed in to change notification settings - Fork 218
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
Filling gaps in config validation for rest settings for entities #1496
Filling gaps in config validation for rest settings for entities #1496
Conversation
Removed some tests that weren't testing the CLI but dependencies (such as CommandLineParser or ILogger)
…them simpler and clearer with the new object structure
Moved logic for Entities defaults to RuntimeEntities rather than deserialiser, as that is a more logical place. We always pass that type around, so we can assume the ctor ran, but we aren't always assuming the deserialiser ran (such as what happens with tests)
Moving to a model where we load the config initially from disk and then generate an in-memory provider using an edited version of the config for the tests
Had introduced a regression that meant custom file names weren't supported on the engine directly. Now that can be passed to the RuntimeConfigLoader, otherwise the default filename is used. This means we're more flexible on the name of the file (useful in tests)
Singular/Plural were collapsed one level early, needed to nest them on a Type property
- Removing shared state as it can cause conflicts - Better modeling of a config for the tests, and swapping in mock services - Fixing the lookup for entities with the @model directive
…asn't the expected result
Had forgotten to remove some old code in the deserializer of RuntimeEntities as well
Since there's a new dependency, Snapshooter, which isn't in the central package repo, we need to override NuGet and tell it to look for it elsewhere. This commit will be reverted when Snapshooter.MSTest is on the primary package feed
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.
lgtm. Just one nit from me and Ani's comments remain.
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.
question about alternative approach to creating record type properties just for lowercase string
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.
LGTM, after resolving remaining comments.
…s://github.com/Azure/data-api-builder into dev/agarwalayush/fillingGapsInConfigValidation
All the concerns have been resolved and the latest changes are building on top of PR #1402.
Why make this change?
There were a lot of validation failure cases that were not in place for runtime config validation and hence were not getting caught as mentioned in the issue: #1494. This PR addresses the same.
What is this change?
Added validations for the below mentioned cases for REST settings for entity:
path
:How was this tested?