apidash icon indicating copy to clipboard operation
apidash copied to clipboard

Enhance Request Body Editor: JSON formatting, syntax highlighting, validation and other features

Open animator opened this issue 2 years ago • 12 comments

This feature was highlighted in #9

Currently, the Request Body is a plain text editor. In case the body is of type json, the editor can provide additional features (without hampering performance) like JSON formatting, Syntax highlighting, JSON validation, etc.

Note: This issue is now a meta issue with several sub-issues.

animator avatar May 05 '23 06:05 animator

@animator Could you explain it a bit more? With screenshots if poosible.

malik-vishu avatar Oct 02 '23 11:10 malik-vishu

Hi @malik-vishu, Please find attached screenshots

JSON formatting

json formatting

Syntax Highlighting

json syntax highlighting

JSON validation

json validation

ashitaprasad avatar Oct 03 '23 10:10 ashitaprasad

Hi @animator, @ashitaprasad , I am currently working in this feature,

antonioCaballero17 avatar Dec 12 '23 08:12 antonioCaballero17

Sure @antonioCaballero17 waiting for your PR. If you have any doubt/query feel free to post it in our discord channel #foss-apidash

ashitaprasad avatar Dec 12 '23 13:12 ashitaprasad

Based on this issue i just develop and published this pacakge https://github.com/antonioCaballero17/json_text_fieldCan I use this in apiDash?

antonioCaballero17 avatar Dec 20 '23 18:12 antonioCaballero17

@antonioCaballero17 you can send across a PR. Will test it out.

animator avatar Dec 21 '23 02:12 animator

Please check #103

antonioCaballero17 avatar Dec 21 '23 13:12 antonioCaballero17

Hi! Sorry for my ghosting, i was moving home last month... I see that you merge the PR. So, great! feature 22 is done! I am looking forward for other feature, i am going to check the issues

antonioCaballero17 avatar Feb 23 '24 14:02 antonioCaballero17

@antonioCaballero17 the PR was merged because it offers something very close to the solution that someone can pick up to continue working on. See the TODO here This issue is still open and requires work.

animator avatar Feb 23 '24 14:02 animator

I want to work on this issue, and I see the merged PR that formats the JSON in the tree structure, but the JSON validation feature has not been implemented yet, which tells me in the tree where JSON validation fails. Am I right ? and we are looking for a feature in which the user simply pastes its text in body and shows three buttons for json formatting, json lighting, and validation.

Arpit-Verma1 avatar Feb 27 '24 05:02 Arpit-Verma1

@arpitvermaofficial you can pick up the existing code base .. tinker around with your ideas and send across a PR. We can discuss over it on the PR.

animator avatar Feb 28 '24 15:02 animator

Please feel free to review my PR. Tomorrow i am going to make a new push

antonioCaballero17 avatar Feb 28 '24 22:02 antonioCaballero17