https://github.com/devtin/schema-validator-doc
https://github.com/devtin/schema-validator-doc
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/devtin/schema-validator-doc
- Owner: devtin
- Created: 2020-05-28T03:16:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T07:13:59.000Z (about 3 years ago)
- Last Synced: 2023-03-01T22:15:46.633Z (about 3 years ago)
- Language: JavaScript
- Size: 1.35 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
@devtin/schema-validator-doc
Converts a `@devtin/schema-validator` instance into JSON
## Installation
```sh
$ npm i @devtin/schema-validator-doc --save
# or
$ yarn add @devtin/schema-validator-doc
```
## schemaValidatorToJSON(schema, [options]) ⇒ JSONSchema
| Param | Type | Description |
| --- | --- | --- |
| schema | Schema | |
| [options] | Object | |
| [options.$name] | String | Name of the schema |
**Returns**: JSONSchema - JSON representation of given schema
**Description:**
Converts given schema in JSON format
## schemaValidatorToMarkdown(jsonSchema) ⇒ String
| Param | Type |
| --- | --- |
| jsonSchema | Array.<JSONSchema>, JSONSchema |
**Returns**: String - Markdown representation
* * *
### License
[MIT](https://opensource.org/licenses/MIT)
© 2020-present Martin Rafael Gonzalez