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

fix: use Digital Planning Application v0.1.1 and fix validation errors #166

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Oct 19, 2023

  • Copy over release v0.1.1 of the Digital Planning Application schema and auto generate types
    • Update mapping to remove metadata.service.publishedFlowId
  • Checking all production submissions in October 2023 to see if they validate or not and fixing errors:
sessionId Type Validates Notes
d7cf2da2-fb4c-4930-841d-33e4ed23d905 Bucks LDC ✔️
fe6fa607-ee22-4e05-b4e0-382d5d00b9e6 Gloucester PP ✔️
2e3cabab-633d-4869-a5de-0752c612ac14 Gloucester PP ✔️
faa32d08-246d-4510-97ef-689abb2b36dc Southwark LDC Custom flag & result text raises enum type error
97c4fe80-2862-4e7e-9e0c-3786ed31a5d6 Southwark LDC Uploaded proposal.drawing.locationPlan instead of drawing; our schema incorrectly marks boundary as required
890ccf44-4c0f-473d-ad7b-f63cae24b19e Lambeth LDC Passport mapping was using planx_value rather than property.type, raising enum type error when OS returns undefined
f4cc3953-bfb1-47d1-a9ce-955a6bd6b549 Lambeth LDC Passport mapping was using planx_value rather than property.type, raising enum type error when OS returns undefined
f4c23bee-f0a4-4915-8e85-3307429a8292 Lambeth LDC applicant.interest = "other" which we haven't accounted for in our enum type
878215a1-ddad-49e8-8040-f52d00c228b3 Lambeth LDC File type proposal.photograph.evidence was provided which we haven't accounted for in our enum type

Relies on some fixes here: theopensystemslab/digital-planning-data-schemas#58 (not included in v0.1.1 release)

value: [flag.category, flag.text].join(" / "),
description: flag.description,
value: title,
description: this.findDescriptionFromValue("ResultFlag", title), // flag.description may be custom text
Copy link
Member Author

Choose a reason for hiding this comment

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

This still won't validate successfully if an application is also using custom flag titles - but it should catch more cases and I'll keep adjusting as we work on flags logic & multiple results overall. I'm hesitant to remove the enum type for "ResultFlag" entirely yet.

@jessicamcinchak jessicamcinchak marked this pull request as ready for review October 20, 2023 11:48
@jessicamcinchak jessicamcinchak requested a review from a team October 20, 2023 11:48
@DafyddLlyr
Copy link
Contributor

PR description and format massively helpful thank you!

@jessicamcinchak jessicamcinchak merged commit 2b7fa5b into main Oct 20, 2023
1 check passed
@jessicamcinchak jessicamcinchak deleted the jess/schema-v0.1.1 branch October 20, 2023 11:59
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.

2 participants