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 - pseudo functions with signatures #11

Open hrennau opened 4 years ago

hrennau commented 4 years ago

In the pseudo-code, the call of populateDataFromInstance() should have one more argument, "attachmentPointer", e.g. like this:

template Data = populateDataFromInstance(T, ldo, attachmentPointer, instance)

In general, I suggest to present the three parts of pseudo-code as pseudo-functions - just by inserting the signature above the code - in order to make the required input clearer:

resolveTemplate(T, initialTemplateKeyword, ldo, attachmentPointer, instance) ... (First block of pseudo-code) ` populateDataFromInstance(T, ldo, attachmentPointer, instance) ... (Second block of pseudo-code) acceptInput(T, ldo, templateData) ... (Third block of pseudo-code)`