From d61bbc2f487f2a8c07958fd986aeaccf9b352f74 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Wed, 21 Jan 2026 11:22:14 +0100 Subject: [PATCH] Add API documentation for JSON file upload and evaluation results --- .github/copilot-instructions.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a1667ff..6abaa6f 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -25,6 +25,29 @@ Framework to be used: - JavaScript (ES6+) for scripting. - Bootstrap for styling and layout. +### API + +The application exposes a REST API for uploading JSON files and retrieving JMESPath evaluation results with query expression. The API endpoints are as follows: + +- `POST /api/v1/upload`: Accepts a JSON with the following structure: + ```json + { + "jmespath": "", + "jsondata": "" + } + ``` + The application should reload the JMESPath expression and JSON data UI elements with the provided data and respond OK if successful. + +- `GET /api/v1/result` - Returns the result of evaluating the current JMESPath expression against the current JSON data in the UI. The response should be a JSON object with the following structure: + ```json + { + "jmespath": "", + "jsondata": "", + "result": "", + "error": "" + } + ``` + ## Containerization The application should be prepared for deployment using containerization. It should extend minimal Node 24 LTS container image.