mapaction / rolling-data-scramble-dashboard-poc

Proof of concept dashboard for the status of the Rolling Data Scrambles
MIT License
1 stars 0 forks source link

Formalise structure and content of export format #30

Open felnne opened 3 years ago

felnne commented 3 years ago

I.e. using a JSON Schema people can refer to if writing an exporter.

Relates to #25.

felnne commented 3 years ago

I think the approach outlined in the Hypermodern Python guide would work well for this.

felnne commented 3 years ago

This issue supersedes #25, which stated:

Too complex a structure to do with normal type hints, however https://pydantic-docs.helpmanual.io includes a method to generate a model from a JSON schema which we could use for this.

I.e. we would write a JSON Schema that describes the export format (which would be useful anyway so there's an official reference for it) and use that to generate a Pydantic model, which the prepare_export method would implement.