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

Initial JSON Schema for license report tool #1713

Closed
wants to merge 5 commits into from
Closed
Changes from all 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
101 changes: 101 additions & 0 deletions src/schemas/json/license-report-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"title": "JSON schema for license report tool configuration file",
"definitions": {
"output": {
"default": "json",
"description": "license report output format",
"enum": [
"json",
"table",
"csv",
"html"
]
},
"html": {
"type": "object",
"description": "HTML output format",
"properties": {
"cssFile": {
"default": "path.resolve(__dirname, '..', 'defaultHtmlStyle.css')",
"type": "string"
},
"tableify": {
"description": "passed directly to tableify (see: https://github.com/kessler/node-tableify)",
"type": "object"
}
}
},
"delimiter": {
"delimiter": ",",
"description": "CSV output format",
"type": "string"
},
"escapeCsvFilelds": {
"default": "false",
"description": "CSV output format: escape fields containing delimiter character",
"type": "boolean"
},
"only": {
"default": "null",
"description": "export deps. or deps/dev-/opt-/peer- deps. falsey -> output everything",
"type": "object"
},
"registry": {
"default": "https://registry.npmjs.org/",
"description": "NPM registry URL",
"type": "string"
},
"exclude": {
"description": "package names that will be excluded from the report",
"items": {
"type": "string"
},
"type": "array"
},
"fields": {
"additionalItems": false,
"description": "fields participating in the report and their order",
"items": {
"enum": [
"department",
"relatedTo",
"name",
"licensePeriod",
"material",
"licenseType",
"link",
"remoteVersion",
"installedVersion",
"author"
],
"type": "string"
},
"type": "array"
},
"comment": {
"description": "export deps. or deps/dev-/opt-/peer- deps. falsey -> output everything",
"properties": {
"label": "comment",
"value": {
"type": "string",
"default": ""
}
}
},
"httpRetryOptions": {
"properties": {
"delay": {
"type": "number",
"default": 1000
},
"maxAttempts": {
"type": "number",
"default": 5
}
},
"type": "object"
}
}
}