Closed corburn closed 2 years ago
@HadleyKing @jpat1546
The following TODO comment was removed unresolved: https://github.com/biocompute-objects/BCO_Specification/commit/1d54f576a4b491726cc202f67c0833d416ed0a15#diff-656fd9726e4db1f485efc2dbd8abbd64L16
"$comment": "TODO: Need to find a way to specify 'filename' is required here.",
It could be resolved with an allOf
definition similar to the software_prerequisites
above.
@corburn - RE:
uri-in-uri stutter Fields such as the following could be flattened using the JSON Schema allOf property:
I am having trouble implementing this. On the allOf documentation page it says the following:
This works, but what if we wanted to restrict the schema so no additional properties are allowed? One might try adding the highlighted line below:
{ "definitions": { "address": { "type": "object", "properties": { "street_address": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" } }, "required": ["street_address", "city", "state"] } },
"allOf": [ { "$ref": "#/definitions/address" }, { "properties": { "type": { "enum": [ "residential", "business" ] } } } ],
"additionalProperties": false } { "street_address": "1600 Pennsylvania Avenue NW", "city": "Washington", "state": "DC", "type": "business" }
>Unfortunately, now the schema will reject everything. This is because the Properties refers to the entire schema. And that entire schema includes no properties, and knows nothing about the properties in the subschemas inside of the allOf array.
>This shortcoming is perhaps one of the biggest surprises of the combining operations in JSON schema: it does not behave like inheritance in an object-oriented language. There are some proposals to address this in the next version of the JSON schema specification.
Would that be why?
@HadleyKing following up on https://github.com/biocompute-objects/UVP-BCO/commit/c33e365fafbfe42ee3f4ffeb43f7a0fb5d1e1786#commitcomment-31591403
pipeline_steps validation
Inserting
"additionalProperties": false,
into thepipeline_steps
definition would catch errors such the followingprerequisites
typo:uri-in-uri stutter
Fields such as the following could be flattened using the JSON Schema
allOf
property: