json-schema-org / json-hyperschema-spec

A *future* location for the JSON Hyper-Schema I-D sources.
14 stars 4 forks source link

7.2 URI Templating - getApplicableSchemas #12

Open hrennau opened 4 years ago

hrennau commented 4 years ago

The explanation is probably not correct:

"getApplicableSchemas()" returns an iterable set of all (sub)schemas that apply to the attachment point in the instance.

The use is this: getApplicableSchemas(ldo.hrefSchema, "/" + varname)

The function use has nothing to do with the attachment point: it extracts from hrefSchema the schema(s) applicable to variable varname. It seems that getApplicableSchemas() should be thought of as a generic function receiving a schema and a JSON pointer and returning the subschemas applicable to the instance value pointed at. Perhaps the explanation should describe this generic functionality, rather than describe the result of its usage.