-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autogenerate scenario schema doc #1441
Conversation
228b5b1
to
3180bb0
Compare
src/Swarm/Doc/Scenario.hs
Outdated
makePandocTable (fn, schm) = | ||
setTitle (text "JSON Schema for Scenarios") $ | ||
doc $ | ||
header 3 (text $ T.toTitle $ T.pack fn) <> para (text $ description schm) <> myTable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a section in Get.hs
for generating tables manually:
-- ----------------------------------------------------------------------------
-- GENERATE TABLES: COMMANDS, ENTITIES AND CAPABILITIES TO MARKDOWN TABLE
-- ----------------------------------------------------------------------------
We could reuse that here or make Gen.hs
use Pandoc as well if Doc is split out.
3180bb0
to
19199f3
Compare
e553a0c
to
5f27081
Compare
5f27081
to
ba81aa3
Compare
ca2ef0d
to
e022916
Compare
e022916
to
c314cc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic! Thanks for putting in all the effort required!
Closes #1436.
The schema
.json
files are now the authoritative source of truth for documentation.Wrote a very simple parser for JsonSchema to extract the documentation from JSON.
Split the README.md into static and auto-generated parts.
Added a custom
"footers"
key to schema files to support inclusion of other markdown files for each object description.Schema doc regeneration