Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Fix/type key exception #2

Merged
merged 5 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"$schema":"http://json-schema.org/draft-04/schema#","$id":"http://www.example.com/schemas/components/Button.json","type":"object","title":"Button","description":"Renders a Button.","additionalProperties":false,"properties":{"properties":{"type":"object","title":"Properties","description":"Properties of Button.","additionalProperties":false,"properties":{"type":{"type":"string","enum":["button","submit","reset"],"title":"Type","description":"The type of the Button (not used for anchors)."}}}}}
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Top-level Schemas

- [Button](./button.md "Renders a Button") – `http://www.example.com/schemas/components/Button.json`
- [Untitled object in undefined](./a.md) – `http://www.axa.ch/schemas/a.json`
- [Untitled object in undefined](./c.md) – `http://www.axa.ch/schemas/c.json`
- [Untitled object in undefined](./node.md) – `http://www.axa.ch/schemas/node.json`
Expand All @@ -11,6 +12,7 @@

### Objects

- [Properties](./button-properties-properties.md "Properties of Button") – `http://www.example.com/schemas/components/Button.json#/properties/properties`
- [Untitled object in undefined](./a-properties-children-items-anyof-1.md) – `http://www.axa.ch/schemas/c.json#/properties/children/items/anyOf/1`

### Arrays
Expand Down
38 changes: 38 additions & 0 deletions docs/button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Button Schema

```txt
http://www.example.com/schemas/components/Button.json
```

Renders a Button.


| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | ------------------------------------------------- |
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [Button.json](Button.json "open original schema") |

## Button Type

`object` ([Button](button.md))

# Button Properties

| Property | Type | Required | Nullable | Defined by |
| :------------------------ | -------- | -------- | -------------- | :---------------------------------------------------------------------------------------------------------------------------- |
| [properties](#properties) | `object` | Optional | cannot be null | [Button](button-properties-properties.md "http://www.example.com/schemas/components/Button.json#/properties/properties") |

## properties

Properties of Button.


`properties`

- is optional
- Type: `object` ([Properties](button-properties-properties.md))
- cannot be null
- defined in: [Button](button-properties-properties.md "http://www.example.com/schemas/components/Button.json#/properties/properties")

### properties Type

`object` ([Properties](button-properties-properties.md))
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@adobe/jsonschema2md": "^4.0.3"
"@adobe/jsonschema2md": "^4.0.9"
Copy link
Contributor Author

@AndyOGo AndyOGo Jan 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: Cannot find module 'es2015-i18n-tag'

npm run test

> cyclic-schemas-test@1.0.0 test .../dev/cyclic-schemas-test
> jsonschema2md -o docs/ -x docs/ -d schemas/ -e json

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'es2015-i18n-tag'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (.../dev/cyclic-schemas-test/node_modules/@adobe/jsonschema2md/lib/index.js:23:24)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

It doesn't seem to be installed properly 🤔

ls -a ./node_modules/es2015-i18n-tag/
.			.all-contributorsrc	CONTRIBUTING.md		README.md		package.json
..			CHANGELOG.md		LICENSE			benchmark.js		yarn.lock

}
}
28 changes: 28 additions & 0 deletions schemas/Button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "http://www.example.com/schemas/components/Button.json",

"type": "object",
"title": "Button",
"description": "Renders a Button.",

"additionalProperties": false,
"properties": {
"properties": {
"type": "object",
"title": "Properties",
"description": "Properties of Button.",

"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": ["button", "submit", "reset"],
"title": "Type",
"description": "The type of the Button (not used for anchors)."
}
}
}
}
}