adobe / jsonschema2md Goto Github PK
View Code? Open in Web Editor NEWConvert Complex JSON Schemas into Markdown Documentation
License: Apache License 2.0
Convert Complex JSON Schemas into Markdown Documentation
License: Apache License 2.0
Example: id
and @id
in the same schema will get turned into #id
and #id-1
by GitHub.
This can be observed here: https://github.com/adobe/jsonschema2md/blob/master/examples/docs/deepextending.schema.md
If this pull request comes through, we should include a note for every schema if it is extensible or not:
see also: https://git.corp.adobe.com/AdobeCloudPlatform/models/pull/43/files#diff-4d7cdf0fc878af052e8b73d41dd8c7ddR48
jsonschema2md
on XDMnode cli.js -o ../xdm/docs/reference -d ../xdm/schemas
https://github.com/adobe/xdm/blob/jsonschema2md-example/docs/reference/assets/artboard.schema.md to look nice.
There are two header lines that are unnecessary.
https://circleci.com/gh/adobe/xdm/2305
XDM is using version 1.0.5 and failing:
> shx mkdir -p docs/reference && jsonschema2md -o docs/reference -d schemas --link-abstract abstract.md --link-extensible extensions.md --link-status status.md --link-id --link-custom extensions.md --link-additional extensions.md
info: output directory: /home/circleci/repo/docs/reference
info: finished reading all *.schema.json files in /home/circleci/repo/schemas, beginning processing….
/home/circleci/repo/schemas/assets/aggregated-asset.schema.json
error: TypeError: Path must be a string. Received true
at assertPath (path.js:7:11)
at Object.relative (path.js:1227:5)
at link (/home/circleci/repo/node_modules/@adobe/jsonschema2md/lib/header.js:80:17)
at headers (/home/circleci/repo/node_modules/@adobe/jsonschema2md/lib/header.js:105:50)
at generateMarkdown (/home/circleci/repo/node_modules/@adobe/jsonschema2md/lib/markdownWriter.js:154:14)
at Schema.getExamples.then.then.then.object (/home/circleci/repo/node_modules/@adobe/jsonschema2md/lib/schema.js:424:11)
Click on the .json link for the schema in DefinedIn column
Open correct .json file of the schema
Error 404(Incorrect link)
This is for all .md files actually but examples below
In Examples: https://github.com/adobe/jsonschema2md/blob/master/examples/docs/arrays.schema.md
In XDM: https://github.com/adobe/xdm/blob/master/docs/reference/assets/aggregated-asset.schema.md
i don't quite understand why settings
renders correctly but collaborators
yields an Unknown type object
i can produce this error with any child object under settings
. is there something wrong w/ my json schema that would cause this?
json:
{
"$id": "test.json",
"$schema": "http://json-schema.org/draft-06/schema",
"title": "test",
"type": "object",
"properties": {
"settings": {
"description": "settings",
"type": "object",
"properties": {
"collaborators": {
"description": "collaborators",
"type": "object",
"patternProperties": {
".*": {
"type": "string"
}
}
}
}
}
},
"additionalProperties": false
}
resulting markdown:
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | No | Forbidden | Forbidden | |
# test Properties
| Property | Type | Required | Defined by |
|----------|------|----------|------------|
| [settings](#settings) | `object` | Optional | test (this schema) |
## settings
settings
`settings`
* is optional
* type: `object`
* defined in this schema
### settings Type
`object` with following properties:
| Property | Type | Required
|----------|------|----------|
| `collaborators`| object | Optional |
#### collaborators
collaborators
`collaborators`
* is optional
* type: `object`
##### collaborators Type
Unknown type `object`.
```json
{
"description": "collaborators",
"type": "object",
"patternProperties": {
".*": {
"type": "string"
}
},
"simpletype": "`object`"
}
If we know the status, we should show it in the README, so that on scanning the list, you can easily get an overview over the experimental and stable schemas.
If a property has been declared in a referenced schema, it should be included in full in the current document's documentation, with a note explaining that it is referenced from another schema.
For instance, for Image
:
## modify_date
`modify_date` is referenced from [Asset](asset.md#modify_date)
The ejs templates for Markdown generation are quite heavy. It would be ideal to just pass pretty-printed JSON objects that don't require much formatting instead.
We have certain schemas that have an @id
attribute, i.e. that are directly addressable, and others that are not. It would make sense to call this out in the documentation.
I defined enum
within a nested schema and the values get lost somehow.
I expect that all values show up the Known Values table.
None are shown.
Note: I run all my schemas through ajv to validate them - which are all fine.
v9.4.0
Sure, I even have a PR of a public repo.
For this schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "http://www.axa.ch/schemas/components/Typo.json",
"type": "object",
"title": "Typo",
"description": "Renders a Typo.",
"additionalProperties": false,
"required": ["component"],
"properties": {
"component": {
"allOf": [
{ "$ref": "http://www.axa.ch/schemas/types/component.json#" },
{ "enum": ["Typo"] }
]
},
"properties": {
"type": "object",
"title": "Properties",
"description": "Properties of Typo.",
"additionalProperties": false,
"properties": {
"value": {
"type": "string",
"title": "Value",
"description": "The text to be displayed."
}
}
},
"style": {
"type": "object",
"title": "Style",
"description": "Style of Typo.",
"additionalProperties": false,
"properties": {
"title": {
"type": "boolean",
"title": "Title",
"description": "Whether or not the text is a heading.",
"default": false
},
"type": {
"type": "string",
"title": "Type",
"description": "The type of heading to be used for display.",
"enum": ["main", "page", "slice", "small-module"],
"default": "main"
},
"publico": {
"type": "boolean",
"title": "Publico",
"description": "Whether or not to use the Publico Headline font in favour of Source Sans Pro",
"default": false
},
"size": {
"type": "string",
"title": "Size",
"description": "Size of Typo.",
"enum": ["semibold", "bold", "normal"],
"default": "normal"
},
"align": {
"type": "string",
"title": "Align",
"description": "Set CSS text-align accordingly.",
"enum": ["left", "right", "center"],
"default": "left"
},
"longer": {
"type": "boolean",
"title": "Longer",
"description": "Whether or not longer style is used for display.",
"default": false
},
"secondary": {
"type": "boolean",
"title": "Secondary",
"description": "Whether or not to display text according to AXA.ch style guide's secondary definition.",
"default": false
},
"secondRow": {
"type": "boolean",
"title": "Second Row",
"description": "Whether or not to use smaller margin between to show that two typos belong together.",
"default": false
},
"color": {
"type": "string",
"title": "Color",
"description": "Color of Typo.",
"enum": ["red", "blue", "black"],
"default": "black"
}
}
}
}
}
I'm getting following Markdown
# Typo Schema
http://www.axa.ch/schemas/components/Typo.json
Renders a Typo.
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | No | Forbidden | Forbidden | [components/Typo.json](components/Typo.json) |
# Typo Properties
| Property | Type | Required | Defined by |
|----------|------|----------|------------|
| [component](#component) | complex | **Required** | Typo (this schema) |
| [properties](#properties) | `object` | Optional | Typo (this schema) |
| [style](#style) | `object` | Optional | Typo (this schema) |
## component
`component`
* is **required**
* type: complex
* defined in this schema
### component Type
**All** of the following *requirements* need to be fulfilled.
#### Requirement 1
* []() – `http://www.axa.ch/schemas/types/component.json#`
#### Requirement 2
## properties
### Properties
Properties of Typo.
`properties`
* is optional
* type: `object`
* defined in this schema
### properties Type
`object` with following properties:
| Property | Type | Required
|----------|------|----------|
| `value`| string | Optional |
#### value
##### Value
The text to be displayed.
`value`
* is optional
* type: `string`
##### value Type
`string`
## style
### Style
Style of Typo.
`style`
* is optional
* type: `object`
* defined in this schema
### style Type
`object` with following properties:
| Property | Type | Required
|----------|------|----------|
| `align`| string | Optional |
| `color`| string | Optional |
| `longer`| boolean | Optional |
| `publico`| boolean | Optional |
| `secondRow`| boolean | Optional |
| `secondary`| boolean | Optional |
| `size`| string | Optional |
| `title`| boolean | Optional |
| `type`| string | Optional |
#### align
##### Align
Set CSS text-align accordingly.
`align`
* is optional
* type: `string`
The value of this property **must** be equal to one of the [known values below](#style-known-values).
##### align Known Values
| Value | Description |
|-------|-------------|
#### color
##### Color
Color of Typo.
`color`
* is optional
* type: `string`
The value of this property **must** be equal to one of the [known values below](#style-known-values).
##### color Known Values
| Value | Description |
|-------|-------------|
#### longer
##### Longer
Whether or not longer style is used for display.
`longer`
* is optional
* type: `boolean`
##### longer Type
`boolean`
#### publico
##### Publico
Whether or not to use the Publico Headline font in favour of Source Sans Pro
`publico`
* is optional
* type: `boolean`
##### publico Type
`boolean`
#### secondRow
##### Second Row
Whether or not to use smaller margin between to show that two typos belong together.
`secondRow`
* is optional
* type: `boolean`
##### secondRow Type
`boolean`
#### secondary
##### Secondary
Whether or not to display text according to AXA.ch style guide's secondary definition.
`secondary`
* is optional
* type: `boolean`
##### secondary Type
`boolean`
#### size
##### Size
Size of Typo.
`size`
* is optional
* type: `string`
The value of this property **must** be equal to one of the [known values below](#style-known-values).
##### size Known Values
| Value | Description |
|-------|-------------|
#### title
##### Title
Whether or not the text is a heading.
`title`
* is optional
* type: `boolean`
##### title Type
`boolean`
#### type
##### Type
The type of heading to be used for display.
`type`
* is optional
* type: `string`
The value of this property **must** be equal to one of the [known values below](#style-known-values).
##### type Known Values
| Value | Description |
|-------|-------------|
Right now, we only handle arrays where items
is a schema. The JSON Schema spec also allows items
to be an array
of schemas. In this case, validation succeeds only if each element in the array validates against the corresponding schema in the items
array.
If additionalItems
is absent, no additional items are allowed. If it is present, all additional items in the array must follow this schema.
This should make browsing listings of generated schemas easier. The generation of the README file should be enabled through an option.
Template Literal is fastest, smallest and simplest template engine, because it use JS's literal template feature.
It's 55 times faster than EJS, and it also use less CPU and RAM ressources, so it may be a good idea to use it instead of EJS 😀
It would be super radical if on successful commits to master, we automatically published the package to Adobe's artifactory instance.
Had a conversation with @trieloff on Slack about this feature.
jsonschema2md
on XDMnode cli.js -o ../xdm/docs/reference -d ../xdm/schemas
https://github.com/adobe/xdm/blob/jsonschema2md-example/docs/reference/assets/asset.schema.md#asset-schema to have a well-formatted description
There are no more line breaks in the description, making it hard to read.
It would be really nice to allow other extensions besides .schema.json
. This is not at all standard, and AFAICT the most common recommendation is to simply use .json
. It'd be nice if this was an option on the CLI.
The meta:example
property is a either a single example, or a list of examples. They should be listed using three backticks as code examples.
See https://github.com/adobe/jsonschema2md/blob/master/examples/docs/complex.schema.md#refabstract-type
Type should be object
and just like for the array, a nested-properties
and nested-property
should be included.
$ node cli.js -d examples/schemas -o examples/docs -x examples/generated-schemas
Generates schemas in examples/docs/_newSchema
, not in examples/generated-schemas
Don't throw the unknown type
error and fall back to printing the schema, instead show the properties allowed.
The not
keyword is currently not understood.
https://git.corp.adobe.com/ankaur/model-spec/blob/exp/newMd/assets/rectangular.schema.md and
https://git.corp.adobe.com/ankaur/model-spec/blob/exp/newMd/content/content.schema.md are examples of "Abstract Schemas", i.e. Schemas that cannot be instantiated directly.
In the generated documentation, we should
definitions
block@ankaur thanks for #23 – I'm reviewing the example output you've provided in https://git.corp.adobe.com/ankaur/model-spec/tree/exp/newMd
https://git.corp.adobe.com/ankaur/model-spec/edit/exp/newMd/assets/asset.schema.md (line 11): the line breaks in the imported description.md get mangled. Markdown needs two line break to create a proper paragraph
I wrote a bunch of draft-v4 schemas and used the default
keyword.
Then i npm i --save-dev @adobe/jsonschema2md
, which resulted in:
{
"devDependencies": {
"@adobe/jsonschema2md": "^1.0.5-SNAPSHOT.190",
}
}
I expect it to be visible in the generated markdown.
Not a single default
value shows up.
Note: I run all my schemas through ajv to validate them - which are all fine.
v9.4.0
Sure, I even have a PR of a public repo.
For this schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "http://www.axa.ch/schemas/types/event.json",
"type": "object",
"title": "Event",
"description": "Any event to be forwarded/ajaxed to Appway's BPM engine.",
"additionalProperties": false,
"required": ["eventName", "eventValue", "skipValidationPhase", "triggered"],
"properties": {
"eventName": {
"type": "string",
"title": "Event name",
"description": "The name of the event.",
"enum": ["onChange", "onClick"],
"default": "onClick"
},
"eventValue": {
"type": "string",
"title": "Event value",
"description": "The kind of action to handle the new value (actually value is in pageValues).",
"enum": ["back", "next", "reload", "cancel", "default"],
"default": "default"
},
"skipValidationPhase": {
"type": "boolean",
"title": "Skip Validation Phase",
"description": "Whether or not failing validation is ignored by this event.",
"default": "false"
},
"triggered": {
"type": "boolean",
"title": "Triggered",
"description": "Is set if this event was dispatched.",
"default": "false"
}
}
}
I'm getting following Markdown
# Event Schema
http://www.axa.ch/schemas/types/event.json
Any event to be forwarded/ajaxed to Appway's BPM engine.
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | No | Forbidden | Forbidden | [types/event.json](types/event.json) |
# Event Properties
| Property | Type | Required | Defined by |
|----------|------|----------|------------|
| [eventName](#eventname) | `enum` | **Required** | Event (this schema) |
| [eventValue](#eventvalue) | `enum` | **Required** | Event (this schema) |
| [skipValidationPhase](#skipvalidationphase) | `boolean` | **Required** | Event (this schema) |
| [triggered](#triggered) | `boolean` | **Required** | Event (this schema) |
## eventName
### Event name
The name of the event.
`eventName`
* is **required**
* type: `enum`
* defined in this schema
The value of this property **must** be equal to one of the [known values below](#eventname-known-values).
### eventName Known Values
| Value | Description |
|-------|-------------|
| `onChange` | |
| `onClick` | |
## eventValue
### Event value
The kind of action to handle the new value (actually value is in pageValues).
`eventValue`
* is **required**
* type: `enum`
* defined in this schema
The value of this property **must** be equal to one of the [known values below](#eventvalue-known-values).
### eventValue Known Values
| Value | Description |
|-------|-------------|
| `back` | |
| `next` | |
| `reload` | |
| `cancel` | |
| `default` | |
## skipValidationPhase
### Skip Validation Phase
Whether or not failing validation is ignored by this event.
`skipValidationPhase`
* is **required**
* type: `boolean`
* defined in this schema
### skipValidationPhase Type
`boolean`
## triggered
### Triggered
Is set if this event was dispatched.
`triggered`
* is **required**
* type: `boolean`
* defined in this schema
### triggered Type
`boolean`
Cannot read property 'replace' of undefined
in templates/md/header.ejs:15
<%- schema.description.replace(/\n/g, '\n\n') %>
This could be fixed by just checking if there is a description
<% if (schema.description!==undefined) { %>
<%- schema.description.replace(/\n/g, '\n\n') %>
<% } %>
In adobe/xdm#161 we introduce a new meta:status
property. This property should show up in the metadata table for each schema, so that consumers can easily find out how stable a pre-1.0 schema is.
Sign our CLA at [SOME LINK](no link yet)
That's going to be challenging ;)
Since #16 came through, this is dead code and can be removed.
Don't use bold for headlines.
Maybe we can use something like this: https://www.npmjs.com/package/@kogai/regex-railroad-diagram
To visualize complex regular expressions.
patternProperties
are currently ignored, but should be listed.
I would like to generate JSON-LD files from the JSON Schema specification. These JSON-LD files should provide additional, optional metadata that stock JSON Schema cannot express.
(suggested by @fmeschbe)
Not in document (or random) order.
You want the Group property to be copyable.
This schema:
{
"$id" : "id",
"title" : "title",
"description" : "desc",
"type" : "object",
"allOf": [
{ "properties": {
"type": { "enum": [ "one", "two" ] }
}, "required" : ["type"]
},
{ "properties": {
"test": { "type": "string" }
}, "required" : ["test"]
}
]
}
Produces this MarkDown:
# title Schema
id
desc
| Abstract | Extensible | Status | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | Forbidden | Permitted | [protocol2.schema.json](protocol2.schema.json) |
# title Properties
| Property | Type | Required | Defined by |
|----------|------|----------|------------|
| [test](#test) | `string` | **Required** | title (this schema) |
| `*` | any | Additional | this schema *allows* additional properties |
## test
`test`
* is **required**
* type: `string`
* defined in this schema
### test Type
`string`
The "type" property disappears completely. However, this is a valid schema that requires both properties. Additionally, if you change one of the "allOf" elements to "$ref" with the same content, everything works just fine.
The same problem applies to anyOf and oneOf combinations.
https://github.com/adobe/xdm/blob/master/docs/reference/context/experienceevent.schema.md
Only to list the references that ExperienceEvent is actually importing, not referring to.
It listed all references
e.g. the >
for block quotes as seen here: https://github.com/adobe/xdm/blob/master/docs/reference/content/content.schema.md
Fix: use <%- foo.bar %>
instead
Some of our builds fail because the sort order of the generated Readme.md
file is unstable, e.g. https://circleci.com/gh/adobe/jsonschema2md/162 where the order of Enumerated
and Definitions
has changed.
As we are using definitions
and $ref
constructs to structure schemas, the generated documentation should list all the schemas that are being referenced, with name and link to the accompanying Markdown file.
e.g.
Image is based on:
* [Asset](asset.md)
* [Extensible](../base/extensibility.md)
If a schema (like extensibility
) is referenced by multiple schemas, it should be listed only the first time to avoid endless and circular lists.
https://github.com/adobe/xdm/blob/master/docs/reference/assets/asset.schema.md#xmpmachineKeywords
should be https://github.com/adobe/xdm/blob/master/docs/reference/assets/asset.schema.md#xmpmachinekeywords
The "Abstract" field should also support "Singleton" for schemas where every property is a const
Like
We should have a small set of example schemas that can be used for integration tests, and to demonstrate new features.
I define an array and used $ref
s for all it's items.
I expected a nice list of all linked references.
Nothing displayed
v9.4.0
Sure, I even have a PR of a public repo.
For this schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "http://www.axa.ch/schemas/types/children.json",
"type": "array",
"title": "Children",
"description": "Components rendered within a Component.",
"additionalItems": false,
"items": [
{ "$ref": "http://www.axa.ch/schemas/components/Autocomplete.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/BulletRadioButtons.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Button.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Checkbox.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Datepicker.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Dropdown.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Error.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Icon.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Link.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/List.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/ListItem.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Map.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Markdown.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/ModalDialog.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/MultipleSelectList.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/MultipleSelectListItem.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/ProcessEnding.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/SegmentedRadioButtons.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/SelectList.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/SelectListItem.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Textarea.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Textfield.json#" },
{ "$ref": "http://www.axa.ch/schemas/components/Typo.json#" }
]
}
I'm getting following Markdown
# Children Schema
http://www.axa.ch/schemas/types/children.json
Components rendered within a Component.
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | No | Forbidden | Permitted | [types/children.json](types/children.json) |
For a property that has enum
values, possible values should be listed like this:
Permitted values are:
- `value1`
- `value2`
- `value3`
Other values are not allowed.
For a property that has meta:enum
values as an array, possible values should be listed like this:
Known values are:
- `value1`
- `value2`
- `value3`
Other values are permitted, but might not be understood by implementations.
For a property that has meta:enum
values as a map, possible values should be listed like this:
Known values are:
- `value1` - description of value1
- `value2` - description of value2
- `value3` - description of value3
Other values are permitted, but might not be understood by implementations.
For a property that has meta:enum
values as a map and enum
, possible values should be listed like this:
Permitted values are:
- `value1` - description of value1
- `value2` - description of value2
- `value3` - description of value3
Other values are not allowed.
As mentioned in #43 it would be nice to make the output of JSON schema's optional (which implies no output by default) or at least configurable.
I think it would be easiest to implement by making it optional, so if the -x path/to/schema-output
flag is not set, there would be no output, this doesn't require additional CLI arguments but it's a bit of a breaking change compared to previous versions...
I ran jsonschema2md --input /path/to/dir ...
I expected it to convert my schemas but ...
I got this error:
/usr/local/jsonschema2md-1.0.2/node_modules/ajv/lib/ajv.js:188
else throw new Error(message);
^
Error: schema is invalid: data.properties['processor'].required should NOT have less than 1 items
at Ajv.validateSchema (/usr/local/jsonschema2md-1.0.2/node_modules/ajv/lib/ajv.js:188:16)
at Ajv._addSchema (/usr/local/jsonschema2md-1.0.2/node_modules/ajv/lib/ajv.js:317:10)
at Ajv.addSchema (/usr/local/jsonschema2md-1.0.2/node_modules/ajv/lib/ajv.js:141:29)
at ReaddirpReadable.readdirp.on.entry (/usr/local/jsonschema2md-1.0.2/cli.js:86:11)
at emitOne (events.js:116:13)
at ReaddirpReadable.emit (events.js:211:7)
at addChunk (/usr/local/jsonschema2md-1.0.2/node_modules/readable-stream/lib/_stream_readable.js:291:12)
at readableAddChunk (/usr/local/jsonschema2md-1.0.2/node_modules/readable-stream/lib/_stream_readable.js:278:11)
at ReaddirpReadable.Readable.push (/usr/local/jsonschema2md-1.0.2/node_modules/readable-stream/lib/_stream_readable.js:245:10)
at ReaddirpReadable.proto._processEntry (/usr/local/jsonschema2md-1.0.2/node_modules/readdirp/stream-api.js:52:8)
at /usr/local/jsonschema2md-1.0.2/node_modules/readdirp/readdirp.js:243:15
at Array.forEach (<anonymous>)
at /usr/local/jsonschema2md-1.0.2/node_modules/readdirp/readdirp.js:241:12
at /usr/local/jsonschema2md-1.0.2/node_modules/readdirp/readdirp.js:199:38
at /usr/local/jsonschema2md-1.0.2/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)
Not relevant
The problem is really in the ajv library, but this tool can ameliorate it by indicating what schema it's processing in cli.js
before calling ajv.addSchema
.
additionalProperties
should be handled.
jsonschema2md
on XDMnode cli.js -o ../xdm/docs/reference -d ../xdm/schemas
https://github.com/adobe/xdm/blob/jsonschema2md-example/docs/reference/assets/artboard.schema.md to have links to the referenced schema
GitHub ignored the links because the fragment identifier contained a :
I'm getting following Markdown
[Rectangular Object (measured in variable unit)](variable-unit-rectangular.schema.md#stLayer:unit)
correct would be:
[Rectangular Object (measured in variable unit)](variable-unit-rectangular.schema.md#stlayerunit)
(lowercase, all special characters stripped)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.