Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Add JSON schema for output of reuse lint --json #128

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

linozen
Copy link
Member

@linozen linozen commented Jun 2, 2023

This addresses fsfe/reuse-tool#728.

@linozen linozen requested a review from mxmehl June 2, 2023 08:46
"licenses": {
"type": "array",
"items": {
"$ref": "#/definitions/Copyright"
Copy link
Member

Choose a reason for hiding this comment

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

Is the object name Copyright the correct name if it also used in a licensing context?

Copy link
Member Author

Choose a reason for hiding this comment

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

What would be the alternative?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe Details or FindingDetails?

Comment on lines +128 to +142
"BadLicenses": {
"type": "object",
"additionalProperties": { "type": "object" },
"title": "BadLicenses"
},
"LicensesWithoutExtension": {
"type": "object",
"additionalProperties": { "type": "object" },
"title": "LicensesWithoutExtension"
},
"MissingLicenses": {
"type": "object",
"additionalProperties": { "type": "object" },
"title": "MissingLicenses"
},
Copy link
Member

Choose a reason for hiding this comment

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

If I understand it correctly these objects are not defined or explicitly structured.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, you're right. That's because the key of these objects is in a sense arbitrary, i.e. the license name. I don't know JSON schema well enough to know whether this can be alleviated. I think for a first version, this is fine though.

Copy link
Member

Choose a reason for hiding this comment

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

Least we could do is force the keys to be strings https://stackoverflow.com/a/26848488

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants