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

Introducing license-report-config.json #1716

Merged
merged 6 commits into from
Jul 8, 2021
Merged

Introducing license-report-config.json #1716

merged 6 commits into from
Jul 8, 2021

Conversation

pubmikeb
Copy link
Contributor

@pubmikeb pubmikeb commented Jul 7, 2021

In includes:

  • the license-report-config.json schema
  • the catalog.json update
  • the test JSON-file

@BePo65
Copy link

BePo65 commented Jul 7, 2021

A few comments / questions:

src/schemas/json/license-report-config.json

  • definition of output: perhaps you could add "type": "string", to be consistent with the definition of "fields"
  • definition of delimiter: shouldn't the first property be "delimiter": ",", (instead of "delimiter": ",",)?
  • definition of comment: the property "type": "object" is missing
  • definition of comment: the property label is dynamic too, so that perhaps "label": { "type": "string", "default": "comment" } is more appropriate?
  • I didn't find the definitions for the properties department, relatedTo, licensePeriod, material, name, licenseType, link, remoteVersion, installedVersion, author. The definition follows the definition of comment.
  • and then there is an undocumented property called "package" with a default value of "./package.json"

src/test/license-report-config/basic-license-report-config.json
I think it would be great, if the test config.json contained all fields, just to test all schema definitions.

But anyway: thanks for entering this definition in this site.

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 7, 2021

  • definition of delimiter: shouldn't the first property be "delimiter": ",", (instead of "delimiter": ",",)?

Perhaps, copy & paste issue, in both cases "delimiter": ",", is proposed.

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 7, 2021

  • I didn't find the definitions for the properties department, relatedTo, licensePeriod, material, name, licenseType, link, remoteVersion, installedVersion, author. The definition follows the definition of comment.

I've done the schema based on the ESLint schema, there the enum items are without the type definition, e.g.:

"enum": [
    "readonly", "writable", "off"
]

It's just initial version, there is still an issue with auto-suggestion, I need to figure out how to do that.

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 7, 2021

I think it would be great, if the test config.json contained all fields, just to test all schema definitions.

Firstly I need to figure out how to deploy the initial version of the schema, then we can adjust the schema itself and the tests as well.

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 7, 2021

@BePo65, btw it looks like there is a typo in escapeCsvFilelds — is it really Filelds or Fields in https://github.com/ironSource/license-report/blob/master/lib/config.js?

/*
escape fields containing delimiter character if output is csv
*/
escapeCsvFilelds: false,

I've proposed a PR kessler/license-report#64 to address escapeCsvFilelds vs. escapeCsvFields.

@BePo65
Copy link

BePo65 commented Jul 8, 2021

  • definition of delimiter: shouldn't the first property be "delimiter": ",", (instead of "delimiter": ",",)?

Perhaps, copy & paste issue, in both cases "delimiter": ",", is proposed.

Of course I wanted to say that this is probably a copy and paste problem (and should say "default": ","), but then I had a copy and paste error myself ;-))

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 8, 2021

  • definition of delimiter: shouldn't the first property be "delimiter": ",", (instead of "delimiter": ",",)?

Perhaps, copy & paste issue, in both cases "delimiter": ",", is proposed.

Of course I wanted to say that this is probably a copy and paste problem (and should say "default": ","), but then I had a copy and paste error myself ;-))

Fixed.

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 8, 2021

Finally, all tests are passed!

"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",
"description": "export deps. or deps/dev-/opt-/peer- deps. falsy -> output everything",
Copy link

Choose a reason for hiding this comment

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

I would just keep the original spelling as it seems to be acceptable too (I am no native speaker so my "wisdom" comes from mdn

@@ -75,14 +76,18 @@
"type": "array"
},
"comment": {
"description": "export deps. or deps/dev-/opt-/peer- deps. falsey -> output everything",
"description": "export deps. or deps/dev-/opt-/peer- deps. falsy -> output everything",
Copy link

Choose a reason for hiding this comment

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

I would just keep the original spelling as it seems to be acceptable too (I am no native speaker so my "wisdom" comes from mdn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rollbacked to falsey.

@madskristensen
Copy link
Contributor

@pubmikeb let me know when this is ready to merge

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 8, 2021

@pubmikeb let me know when this is ready to merge

It's ready!

@madskristensen madskristensen merged commit 7de307d into SchemaStore:master Jul 8, 2021
@madskristensen
Copy link
Contributor

Thanks

@pubmikeb
Copy link
Contributor Author

pubmikeb commented Jul 8, 2021

Thanks for merging the schema.

@madskristensen, how can I get this schema on https://www.schemastore.org/json?

@GerryFerdinandus
Copy link
Contributor

@pubmikeb It is auto generated. It is already on the site.

hayssams added a commit to ebiznext/schemastore that referenced this pull request Jul 14, 2021
* master: (79 commits)
  adds hosted Portman schema (SchemaStore#1723)
  Fix identifier for lower_safe_namespace in the forms object of the .NET template files (template.json) schema (SchemaStore#1722)
  Introducing `license-report-config.json` (SchemaStore#1716)
  Fix filename for artifacthub-repo.yml (SchemaStore#1721)
  Add JSON schemas for Helm charts (SchemaStore#1718)
  Add JSON schema for artifacthub-repo.yml (SchemaStore#1720)
  Add JSON schema for .postcssrc (SchemaStore#1719)
  Add docker service for appveyor.json schema (SchemaStore#1717)
  add pull_request_template.md (SchemaStore#1714)
  remove grunt-http (SchemaStore#1712)
  F-Droid Data metadata: fix "fileMatch" (SchemaStore#1711)
  Adjusted description for `ecmaVersion` (SchemaStore#1710)
  iobroker io-package: bring back common.main and add common.restartSchedule (SchemaStore#1709)
  add outblocks schema (SchemaStore#1707)
  update AJV 8.6.0 -> 8.6.1 (SchemaStore#1708)
  Move some schema from tv4 validator to AJV validator (SchemaStore#1706)
  Add F-Droid Data metadata schema (SchemaStore#1704)
  Added support of "ecmaVersion" 'latest' (SchemaStore#1703)
  Update Semgrep rule schema (SchemaStore#1702)
  [tsconfig] Adds support up to TypeScript 4.4, adds watch options and build options (SchemaStore#1697)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants