-
Notifications
You must be signed in to change notification settings - Fork 20
Add JSON schema for output of reuse lint --json
#128
base: main
Are you sure you want to change the base?
Conversation
"licenses": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Copyright" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Details or FindingDetails?
"BadLicenses": { | ||
"type": "object", | ||
"additionalProperties": { "type": "object" }, | ||
"title": "BadLicenses" | ||
}, | ||
"LicensesWithoutExtension": { | ||
"type": "object", | ||
"additionalProperties": { "type": "object" }, | ||
"title": "LicensesWithoutExtension" | ||
}, | ||
"MissingLicenses": { | ||
"type": "object", | ||
"additionalProperties": { "type": "object" }, | ||
"title": "MissingLicenses" | ||
}, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
This addresses fsfe/reuse-tool#728.