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

wip: update digital planning schema types and map to passport #131

Merged
merged 15 commits into from
Sep 29, 2023

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Sep 18, 2023

Changes:

  • Copied most recent Open API schema.json and generated new types
  • Started mapping passport fields to Payload["data"] type - this is a bit patchy and tedious as schema is still changing too
  • Added mock session data for 4 application types generated by Alastair for testing (only using these for digital planning data right now, but it's a robust set we should use more widely too!)
    Screenshot from 2023-09-29 09-01-09

This is enough of a start to satisfy the planx-new admin endpoint work over here theopensystemslab/planx-new#2223

Next steps:

  • Review & merge this so we have a more stable generateDigitalPlanningDataPayload export function on main branch
  • Repeat 🌀 (finalise latest round of schema changes, merge those in digital planning repo, copy schema.json back here and keep mapping!)

@jessicamcinchak jessicamcinchak marked this pull request as ready for review September 29, 2023 07:09
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Super clean and easy to read 👍 Looking good.

@@ -64,28 +77,13 @@ export class DigitalPlanning {
},
session: {
source: "PlanX",
id: "b3320abe-f5bc-4185-b61f-40e9e65f07ad",
id: "b3320abe-f5bc-4185-b61f-40e9e65f07ad", // this.sessionId throws 'must match format UUID' error
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah this is an interesting one, thanks for the comment

}

private getApplicationType(): Payload["data"]["application"]["type"] {
// @todo figure out how to lookup via exported type or schema.json ??
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@jessicamcinchak jessicamcinchak merged commit dcf0f07 into main Sep 29, 2023
3 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/export-digital-planning-schema branch September 29, 2023 09:33
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