-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conflict between @range {json} and default parameters #87
Comments
I think this is correct though. Since you provide a default value, this param is optional for TS. Therefore, the generator also sees it as optional, hence the union with undefined. |
The problem is that this causes Components.js not to parse the config as any JSON object anymore. It complains about the fields in the JSON to be undefined URIs. |
Ah, then it may be a bug during context generation. Could you check if your context contains |
It does not: "YargsCliExtractor": {
"@id": "scs:dist/init/cli/YargsCliExtractor.jsonld#YargsCliExtractor",
"@prefix": true,
"@context": {
"parameters": {
"@id": "scs:dist/init/cli/YargsCliExtractor.jsonld#YargsCliExtractor_parameters"
},
"options": {
"@id": "scs:dist/init/cli/YargsCliExtractor.jsonld#YargsCliExtractor_options"
}
}
}, |
|
No, scratch that, this is the correct place: https://github.com/LinkedSoftwareDependencies/Components-Generator.js/blob/feature/strict-type-checking/lib/serialize/ContextConstructor.ts#L72-L81 But the earlier link already shows a possible fix :-) |
Using version
3.0.0-beta.7
Generates the following JSON-LD (same for both parameters):
Should just be
rdf:JSON
instead of the union.The text was updated successfully, but these errors were encountered: