signum-node icon indicating copy to clipboard operation
signum-node copied to clipboard

Can't send multi line messages in api-doc

Open deleterium opened this issue 3 years ago • 6 comments

Currently in api-doc page, the html codes for all api's where it is possible to send text are based on <input type="text">. This is ok to send single lines messages but the browser remove these bytes if the pasted message contains them. Also the browser does not allow to add new lines in these input types.

Multi line messages are correctly saved on signum database, if sent correctly. So this is a frontend problem on api-doc.

A simple fix is just change the input types to <textarea>, so multi lines messages are correctly sent thru api.

deleterium avatar Apr 27 '22 16:04 deleterium

We intend to move over to OpenAPI Spec 3.... then we'll have another UI (see Swagger UIs)

ohager avatar Jun 14 '22 21:06 ohager

see #628

ohager avatar Jul 27 '22 22:07 ohager

ok... problem is that multilines usually are not used within query parameters.... this requires another adjustment in the documentation engine...using a custom tag, e.g x-multiline

ohager avatar Jul 27 '22 23:07 ohager

Adding some comment here...not something that I can do so quick. It's a bit more of a deep dive into the rapidoc fork. I found the relevant rendering piece here:

https://github.com/signum-network/RapiDoc/blob/master/src/components/api-request.js#L900

This one should be a <textarea> element when getting a certain format type (this needs to be something custom as this is not part of the OAS spec itself, like an extension: x-multiline=4)

ohager avatar Jul 27 '22 23:07 ohager

@deleterium is this request closed with the new API doc ?

frankTheTank72 avatar Oct 09 '22 15:10 frankTheTank72

@deleterium is this request closed with the new API doc ?

No. The fields used for messages still are <input>

deleterium avatar Oct 10 '22 18:10 deleterium