Documentation for Iglu Central
- Dominant language
- JavaScript
- Stars
- 724
- Forks
- 150
- Avg merge
- 18h 22m
- Merged PRs (30d)
- 4
Description
## What did you do
I am trying to generate documentations for snowplow/iglu-central: https://github.com/snowplow/iglu-central/tree/master/schemas
Since Snowplow schemas have no file extension, (i.e. 1-0-0) I had to add the extension myself:
```
mkdir input
cd input && git clone https://github.com/snowplow/iglu-central.git
find . -type f -name '*-*-*' -exec sh -c 'x="{}"; mv "$x" "${x}.schema.json"' \;
cd ..
node cli.js -d input/iglu-central/schemas -o output -v 04
```
Then it gave me this error:
```
node cli.js -d input/iglu-central/schemas -o output -v 04
4
info: output directory: jsonschema2md/output
error: Ajv processing error for schema at path jsonschema2md/input/iglu-central/schemas/com.adjust/install/jsonschema/1-0-0.schema.json
error: no schema with key or ref "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
```
So I had to replace the main schema file path and I decided to have local address because I could not change the one on Iglu Server:
```
find . -name '*.schema.json' | xargs sed -i .bak 's/http:\/\/iglucentral.com\/schemas\/com.snowplowanalytics.self-desc\/schema\/jsonschema\/1-0-0#/com.snowplowanalytics.self-desc\/schema\/jsonschema\/1-0-0.schema.json/g'
```
Again, I have the same problem, so probably my solution was not right. This is the error message:
```
node cli.js -d input/iglu-central/schemas -o output -v 04
4
info: output directory: jsonschema2md/output
error: Ajv processing error for schema at path jsonschema2md/input/iglu-central/schemas/com.adjust/install/jsonschema/1-0-0.schema.json
error: no schema with key or ref "com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0.schema.json"
```
## What did you expect to happen
The documentation to be generated
## What happened
It didn't work. I have pasted the errors above.
## What's your environment
* Operating System: MacOS
* node.js version: 10.12.0
## Do you have example files:
https://github.com/snowplow/iglu-central/blob/master/schemas/com.adjust/install/jsonschema/1-0-0
Contributor guide
Research direction
Start with cli.js and reproduce the AJV processing error using the command and input/iglu-central/schemas path described in the issue. Inspect handling of the example schema at schemas/com.adjust/install/jsonschema/1-0-0, and consider the work done when documentation generation succeeds without manually renaming files or rewriting schema references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, json, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100