API Registry - create/edit endpoint modal#983
Open
ruwinirathnamalala wants to merge 14 commits intobuerokratt:devfrom
Open
API Registry - create/edit endpoint modal#983ruwinirathnamalala wants to merge 14 commits intobuerokratt:devfrom
ruwinirathnamalala wants to merge 14 commits intobuerokratt:devfrom
Conversation
Pull from buerokratt/dev
15 tasks
| }); | ||
|
|
||
| const initialHistoryState = { | ||
| nodes: JSON.parse(JSON.stringify(nodes)), |
Collaborator
Author
There was a problem hiding this comment.
The structuredClone approach failed with DataCloneError because flow nodes contain function references (onDelete, onEdit, setClickedNode, update), which cannot be cloned by the structured clone algorithm. The JSON.parse(JSON.stringify()) method is used here to strip functions from nodes before saving to history, which are then manually re-attached during undo/redo operations.
Collaborator
This was referenced May 5, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


#928
Overview
Implements the create and edit flows for both Custom and OpenAPI endpoints across the API Registry page, extending the existing modal used in Service Flow. Changes span the GUI frontend, Ruuter DSL flows, Resql SQL queries, and a Liquibase database migration.
GUI (
GUI/src/)Endpoint Create / Edit Modal
components/Flow/EdgeTypes/AddEndpointModal.tsx— Implements both create and edit flows:onSaveSuccesscallback — API Registry list refreshes automatically after a successful create or editOpenAPI Endpoint
components/ApiEndpointCard/Endpoints/OpenAPI/index.tsx:typeresolves correctly for OpenAPI 3.x specs where type is nested underschema(e.g.param.schema.type)useEffectfor description initialisation with auseStateinitializerCustom Endpoint
components/ApiEndpointCard/Endpoints/Custom/index.tsx— Name, description, params, and test URL fully wired for both create and editMandatory Parameters Feature
components/ApiEndpointCard/Endpoints/RequestVariables/MandatoryCell/index.tsx(new) — Yes/No dropdown in the Params tab for marking parameters as mandatorycomponents/ApiEndpointCard/Endpoints/RequestVariables/columns.tsx— Added Mandatory column for Params tabcomponents/ApiEndpointCard/Endpoints/RequestVariables/index.tsx— Violation tracking for save blockingAPI Registry
pages/ApiRegistryPage.tsx— "Create new endpoint" button opens the create modal; list refreshes after successful savepages/ApiRegistryPage/ApiRegistryTable.tsx— Param tooltip now displays param type:name (TYPE) : valueService Flow Sidebar
store/api-registry.store.ts— Endpoint mapping now includesdescriptionfield from API responsei18n (
i18n/en/common.json,i18n/et/common.json)Added translation keys:
endpoints,fetchEndpointsSuccess,paramMandatory,mandatoryYes,mandatoryNo,mandatoryNameValueRequired,nameTypeDescriptionRequiredRuuter (
DSL/Ruuter/)POST/services/service-by-id.yml(modified)get_endpoints_by_service_idstep now callsget_all_endpoints— no longer filters byservice_ididfrom request bodyPOST/services/create-endpoint.yml(modified)descriptionfield to the declaration and request body (description: ${incoming.body.description ?? ''})POST/services/update-endpoint.yml(modified)descriptionfield to the declaration and request body (description: ${incoming.body.description ?? ''})Resql (
DSL/Resql/services/POST/endpoints/)get_all_endpoints.sql(new)Returns all non-deleted endpoints with search filter and user-preference ordering. No
service_idoris_commonfilter — used by the service flow sidebar to show all available endpoints.get_common_endpoints.sql(modified)Added
descriptionto SELECT.get_endpoints_by_service_id.sql(modified)Added
descriptionto SELECT.create_endpoint.sql(modified)Added
descriptionto INSERT columns and values.update_endpoint.sql(modified)Added
description = :descriptionto the UPDATE SET clause.Liquibase Migrations (
DSL/Liquibase/)20260428120000_add-description-to-endpointsdescription TEXT NOT NULL DEFAULT ''column to theendpointstableIncludes rollback script.