Closed BigIdeas closed 2 years ago
Latest commit: 988580c2db2dd887147b0bd9a4863f4f84f42807
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@BigIdeas We're considering having policies with no rules be deactivating policies, and if we go through with that, they shouldn't ever show up in the front-end.
Does this need a corresponding AJV query param validation update too?
Good question but... I don't think so? I'm not seeing any existing validation of the readPolicies query params. Very happy to write a quick validator if we're moving in that direction though.
Does this need a corresponding AJV query param validation update too?
Good question but... I don't think so? I'm not seeing any existing validation of the readPolicies query params. Very happy to write a quick validator if we're moving in that direction though.
@avatarneil yeah, checked, none of the queries on Policy Service validate their input.
In mds-policy-api
there's a bunch of parsers, but they're express-style parsers, not AJV-ish things.
@BigIdeas We're considering having policies with no rules be deactivating policies, and if we go through with that, they shouldn't ever show up in the front-end.
Awesome, good to know! I'm thinking I'll keep this PR as is now - err on the side of showing all policies - and can easily delete the extra query for null rules if/when we start using those to deactivate policies.
📚 Purpose
FHV conductor requires the ability to filter policies by
modalities
. This adds support for that tomds-policy-service
. A future PR will bring this new filter param intomds-gql
.Any policy with at least one rule matching any of the requested modalities will be returned.
While working on this I noticed that in city-dev there are policies without rules, policies whose rules are an empty array, and policies with rules that have no
modality
. I'm not sure whether we should expect policies like those in production, but I wrote themodality
query such that those will all be returned by a query formicromobility
(the default modality) just in case.🗄️ Database Changes:
💔 Breaking Changes: