mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
In other API specs, you provide example values in the schema. So the specs contain examples which can be used for the documentation. But instead of defining example data separately, we can use the generated data by the specs. This way we document real output and don't have to double up on documentation. Note that we don't have schema definitions for the DFC API yet. And it wouldn't make sense to replicate the DFC Ontology manually in JSON Schema for this purpose. The DFC Connector ensures already that we comply with the ontology. But I hope that we can use a tool at some point to generate JSON Schema from the DFC Ontology which would add more detail to the Swagger docs, I think.