hal-forms icon indicating copy to clipboard operation
hal-forms copied to clipboard

How to define arbitrary key/value pairs as properties in a template?

Open Ickbinet opened this issue 4 years ago • 5 comments

Is it possible to define properties which accept arbitrary key/value pairs? For example when the server accepts a Map as request body.

Like properties: * or so...

POST /foo
key1=value1&key2=value2,...

Ickbinet avatar Oct 23 '21 10:10 Ickbinet

no formal structure right now.

FWIW, when i need this kind of input, i just send the API consumer instructions to send a POST using application/x-www-form-urlencoded name/value pairs. for human UI, this might be prompted using JS or might be just a TEXTAREA box.

if you have some other ideas, happy to discuss.

mamund avatar Oct 25 '21 00:10 mamund

Thank you for the response.

"just send the API consumer instructions "

How to? There is no template property like "info/hints" etc. Atm only a curie with a doc link could help, but this requires an extra document.

Maybe a property type Form could help?

Ickbinet avatar Oct 25 '21 10:10 Ickbinet

"just send instructions" === documentation

again, if you'd like to propose something to add to HAL-FORMS to solve this problem, happy to discuss.

mamund avatar Oct 25 '21 13:10 mamund

What is the best place to discuss it? Here? https://groups.google.com/g/hal-discuss

Ickbinet avatar Oct 25 '21 14:10 Ickbinet

yep. lots of stamrt folks there.

mamund avatar Oct 25 '21 14:10 mamund