Skip to content
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

Devfile Spec documentation generator #12272

Closed
skabashnyuk opened this issue Dec 23, 2018 · 11 comments
Closed

Devfile Spec documentation generator #12272

skabashnyuk opened this issue Dec 23, 2018 · 11 comments
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.

Comments

@skabashnyuk
Copy link
Contributor

Description

Ideally, we should have a way to generate Devfile Spec documentation from Json-schema https://github.com/eclipse/che/blob/master/wsmaster/che-core-api-devfile/src/main/resources/schema/devfile.json

So far I found such generators.

The goal of this task is to review possible options and decide which one to use or write documentation manually

@skabashnyuk skabashnyuk added kind/task Internal things, technical debt, and to-do tasks to be performed. team/platform labels Dec 23, 2018
@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jan 9, 2019

Additional JSON schema 2 markdown tools:
https://github.com/adobe/jsonschema2md (NodeJS, Apache 2.0)
https://github.com/AnalyticalGraphicsInc/wetzel (NodeJS, Apache 2.0 )
https://github.com/rdpickard/doctor_jsonschema_md (Python, BSD-3)

the 1st one looks more preferrable for me yet

@l0rd
Copy link
Contributor

l0rd commented Jan 10, 2019

@mshaposhnik +1 for the adobe jsonschema2md

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jan 16, 2019

OK i checked them all and here is the summary table:

Repository Result Example Building complexity
bootprint/bootprint-json-schema https://mshaposhnik.github.io/bootprint/index.html Low
interagent/prmd https://github.com/mshaposhnik/spec-docs/blob/master/prmd/schema.md Low
cloudflare/json-schema-tools https://mshaposhnik.github.io/cloudflare_json_schema_tools/build/index.html High
adobe/jsonschema2md https://github.com/mshaposhnik/spec-docs/blob/master/adobe_jsonschema2md/devfile.md High
AnalyticalGraphicsInc/wetzel Not working (unsupported schema version) None
rdpickard/doctor_jsonschema_md Not working (unsupported schema version) None

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jan 16, 2019

So the cloudflare & adobe one looks most preferrable, cloudflare lib is generating nice & pretty HTML docs with ability to add navigation menu at the left etc. while the adobe one generating nice & detailed markdown doc.

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jan 17, 2019

So I propose to start with Adobe markdown tool (as markdown more widely used for the rest of our docs), but keep an eye on the HTML generator in case we will need more pretty version. @l0rd @skabashnyuk WDYT ? Or should we discuss that wider, like on che-dev list?

@slemeur
Copy link
Contributor

slemeur commented Jan 17, 2019

Nice work @mshaposhnik ! +1 to start with markdown

@l0rd
Copy link
Contributor

l0rd commented Jan 17, 2019

@mshaposhnik thanks for generating all these samples. That helps :-)

I agree markdown is the best option and the format we were looking for. Anyway I have a couple of questions:

  • your cloudflare/json-schema-tools sample looks like it doesn't have the definitions of all the attributes of the devfile but only the top level ones. Is it a tool limitations?
  • adobe/jsonschema2md is not easy to read, for instance bootprint formatting is nicer. Is there any formatting option when you generate the markdown file?

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jan 18, 2019

Thanks for all your responces.
@l0rd yes, cloudflare allows to show all definitions, but default template requires to click on links to expand whole tree:
image
BTW we have some fields definitions still missing in schema itself, need to write them.

As of jsonschema2md, at first sight there is only default templates, need to investigate if there is any customization options.

@l0rd
Copy link
Contributor

l0rd commented Jan 25, 2019

@mshaposhnik what's the next step here? We should publish the documentation somewhere like http://redhat-developer.github.io/devfile to be able to share the devfile format with the community.

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jan 28, 2019

So, as a result of this issue, several doc generators were tried, and the final decision made is to continue work using adobe/jsonschema2md library, based on:

@l0rd
Copy link
Contributor

l0rd commented Jan 28, 2019

@mshaposhnik 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

4 participants