kellpossible / avalanche-report

A simple self-hosted web server for creating and managing an avalanche forecast for a region, along with accepting public observations.
GNU Affero General Public License v3.0
20 stars 1 forks source link

Document template data schema using JsonSchema and provide some way of viewing it #69

Open kellpossible opened 5 months ago

kellpossible commented 5 months ago

If users want to customize templates using #33 they will need to understand the shape of the data being provided to the templates, and ideally they should not need to read Rust code for this.

We can generate the schema using this macro https://docs.rs/schemars/latest/schemars/ then perhaps the schema for the template can be fetched using some special header like the mime type application/schema+json

kellpossible commented 5 months ago

Potentially this tool can be used to view the json schema