Skip to content

chore: ODP Schema v0.7.7 mappings#933

Merged
jessicamcinchak merged 2 commits intomainfrom
jess/odp-schema-mappings-v0.7.7
Feb 26, 2026
Merged

chore: ODP Schema v0.7.7 mappings#933
jessicamcinchak merged 2 commits intomainfrom
jess/odp-schema-mappings-v0.7.7

Conversation

@jessicamcinchak
Copy link
Member

Relies on theopensystemslab/digital-planning-data-schemas#393

  • Copied + pasted latest .json files & ran pnpm generate-types-from-schema
  • Updated model.ts mappings as necessary
  • Updated mock session data for unit tests & validation checks

source: "Planning Data",
"digital-land-datasets": ["certificate-of-immunity"],
category: "Heritage and conservation",
},
Copy link
Member Author

Choose a reason for hiding this comment

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

model: "Google Gemini",
},
],
}),
Copy link
Member Author

Choose a reason for hiding this comment

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

Based on example passport output of an EnhancedTextInput (note we need to update project.description to proposal.description for consistency in editor):
Image

Copy link
Member Author

Choose a reason for hiding this comment

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

Now correct in PlanX editor too ✅ theopensystemslab/planx-new#6218

Copy link
Member

@freemvmt freemvmt left a comment

Choose a reason for hiding this comment

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

Fabulous

* Total calculated fee in GBP
*/
calculated: number;
calculatedVAT?: number;
Copy link
Member

Choose a reason for hiding this comment

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

Do we want a comment for this, like for payableVAT? of course, it's obvious what it is :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good observation - these types are auto-generated from preApplication/schema.json and never manually edited so comments can be a little inconsistent depending on use of @id, @description etc in the JSON Schema itself !

As JSON side is already released, going to ignore this for now but have a note to double-check at the source in next round of edits!

Copy link
Member

Choose a reason for hiding this comment

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

nice, that's great! was just a curiosity :)

},
fee: this.getBaseFee(
false,
) as PreApplicationPayload["data"]["application"]["fee"],
Copy link
Member

Choose a reason for hiding this comment

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

TS can't work out what type should be returned depending on the bool submitted? sad!

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe there's smarter syntax here but I couldn't figure it out! Honestly lots of maybe-unnecessary/overly-cautious as casting throughout this file to revisit one day !

@jessicamcinchak jessicamcinchak merged commit bf5b077 into main Feb 26, 2026
4 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/odp-schema-mappings-v0.7.7 branch February 26, 2026 15:12
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