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

Cleanup JSON schemas and add ADR #174

Merged
merged 8 commits into from
Apr 24, 2024
Merged

Cleanup JSON schemas and add ADR #174

merged 8 commits into from
Apr 24, 2024

Conversation

gregtyler
Copy link
Contributor

lpa.json is now the full LPA structure. submitted-lpa.json is the subset of fields that should initially be initially submitted from MRLPA or scanning.

Create translation.*.json to indicated what translation files might look like/contain.

Add an ADR documenting how we will use, host and version our JSON schemas.

#minor

@gregtyler gregtyler requested a review from a team as a code owner April 22, 2024 07:59
@gregtyler gregtyler force-pushed the json-schema-expansion-adr branch from 911f8f7 to 3701b93 Compare April 22, 2024 08:13

To ensure we capture and preserve the context of LPAs, each LPA will be associated with a JSON schema at point of execution (online) or ingestion (paper). That schema will document the shape of the LPA's data.

The schema file will be mapped to translation files that contain any important text associated with the LPA, such as the terms the donor agreed to. There will be a file for each language a donor can use (currently English or Welsh).
Copy link
Contributor

Choose a reason for hiding this comment

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

should this also say something about the decision made that the language signed in is assumed to be the same as the contactLanguagePreference for the donor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if we'd landed on a definitive answer for that yet so didn't want to specify it in here

docs/openapi/openapi.yaml Outdated Show resolved Hide resolved
docs/schemas/2024-04/lpa.json Outdated Show resolved Hide resolved
docs/schemas/2024-04/translation.en.json Outdated Show resolved Hide resolved
`lpa.json` is now the full LPA structure. `submitted-lpa.json` is the subset of fields that should initially be initially submitted from MRLPA or scanning.

Create `translation.*.json` to indicated what translation files might look like/contain.

Add an ADR documenting how we will use, host and version our JSON schemas.

#minor
- Use date-time in schema to reflect existing code
- Use "donorTerms" rather than "terms"

#patch
@gregtyler gregtyler force-pushed the json-schema-expansion-adr branch from 3701b93 to 47fd963 Compare April 22, 2024 10:30

As validation is currently done manually, there is a risk that the structure of the LPA will not match the JSON schema. We should introduce schema validation when storing an LPA to ensure this is not the case.

We need to ensure that any changes to the structure of the data are properly updated in the schema. An exception to this is before the start of private beta, since we will only be working with test data and can more easily change the schema.
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably need to add something about what the intended process is for proposing new schema versions. i.e. must have clear intent and cross-team ratification (via PR?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a bit more about this, but I don't want to get into too much specification since I don't have a strong feeling of how this will work best. I think as we see how this works into products we'll be able to define what structure and safeguards we need.

Aligns better with MRLPA and Sirius language, and is a bit clearer about it contents.

#patch
For easier management between languages

#patch
"InitialLpa" -> "DonorDetails"

#patch
@gregtyler gregtyler force-pushed the json-schema-expansion-adr branch from 204f1cc to 7e88fef Compare April 24, 2024 09:13
Copy link
Contributor

@acsauk acsauk left a comment

Choose a reason for hiding this comment

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

:shipit:

@gregtyler gregtyler merged commit ad33b0a into main Apr 24, 2024
23 checks passed
@gregtyler gregtyler deleted the json-schema-expansion-adr branch April 24, 2024 13:37
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.

4 participants