-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Description
Today the schemas and the Markdown documentation files are maintained separately by hand, thus spreading out information about events. We should collect that information in a single place and generate both schemas and documentation files.
I don't have a particular file format in mind, but one could imagine a YAML format that's more or less a superset of the JSON schema specification with additional keys for documentation and other metadata used when generating documentation but stripped when generating a schema.
Motivation
- The schemas can't express all rules in the spec, like what event types are valid targets for particular link types. Right now the schemas don't even express which link types are valid for an event type, but at least that's fixable (see JSON schema doesn't have link objects validations for Eiffel events #148).
- Changing parts of the documentation shared between all events requires modifying and reviewing 23 files.
- The lack of machine-readable documentation of the event members makes it hard to generate SDKs with documentation (Javadoc, docstrings, godoc, ...).
- In Propose to have a diagram which can visualize all the connection between different Eiffel events types #281 there's an excellent suggestion to visualize the relationships between event types but that would currently require manual labor.
- When e.g. considering protocol changes it's often useful to understand how events can relate, like "what kind of events can link to CD?". Right now the best way of answering such a question is probably to grep the Markdown files and that's not a fantastic method.
Exemplification
See above.
Benefits
The current representation of event schemas and documentation is an obstacle for protocol maintainers and others who want to process the information with a program. Making this change would greatly improve the situation.
Possible Drawbacks
Complexity? Hand-written files are labor intensive but they're at least simple to grasp.