The problem with this that any correct value you use for href will match bothhref and hrefTemplated because the are said to both be strings. Because it will always match both instead of one or the other this linkObject definition will never validate data because the href is required and will always match both instead of one or the other.
"definitions": {
"href": {
"title": "HREF",
"description": "A hyperlink URL",
"type": "string"
},
"hrefTemplated": {
"title": "Templated HREF",
"description": "A hyperlink that is a URI template (RFC 6570)",
"type": "string"
},
The linkObject says that a
href
can only haveoneOf
the following properites( Source https://github.com/smizell/hyperschema.org/blob/master/src/mediatypes/hal.json#L33-L34 )
The problem with this that any correct value you use for href will match both
href
andhrefTemplated
because the are said to both be strings. Because it will always match both instead of one or the other this linkObject definition will never validate data because thehref
is required and will always match both instead of one or the other.( Source https://github.com/smizell/hyperschema.org/blob/master/src/core/link.json#L2-L12)
Looking at what is drafted up here: https://github.com/json-schema/json-schema/wiki/anyOf,-allOf,-oneOf,-not
I would suggest using
anyOf
for thehref
instead ofoneOf