Skip to content

Remove public private endpoint distiction#989

Open
ruwinirathnamalala wants to merge 17 commits intobuerokratt:devfrom
rootcodelabs:951/remove_public_private_endpoint_distiction
Open

Remove public private endpoint distiction#989
ruwinirathnamalala wants to merge 17 commits intobuerokratt:devfrom
rootcodelabs:951/remove_public_private_endpoint_distiction

Conversation

@ruwinirathnamalala
Copy link
Copy Markdown
Collaborator

#951

Overview

Removes the public/private endpoint distinction (is_common) from the endpoint data model. Previously, endpoints were marked as either "public" (common) or "private" per service — this concept is eliminated entirely at the GUI, DSL, and database levels. All endpoints are now treated uniformly without a visibility flag.

GUI (GUI/src/)

API Constants

  • resources/api-constants.ts — Renamed getCommonEndpoints()getAllEndpoints(); URL changed from /endpoints/common to /endpoints/all

Stores

  • store/new-services.store.ts:
    • Renamed loadCommonEndpointsloadAllEndpoints (interface + implementation)
    • Removed endpoint-level isCommon from store state, resetState, and loadAllEndpoints response mapping
    • Restored service-level isCommon (set from serviceResponse.data.isCommon in loadService) — service-level visibility is out of scope for this ticket
    • Fixed request body key: pageSizepage_size to match Ruuter allowlist
  • store/api-registry.store.ts:
    • Updated loadEndpoints call: getCommonEndpoints()getAllEndpoints()
    • Removed isCommon: row.isCommon from endpoint mapper
    • Removed isCommon: endpoint.isCommon ?? true from copyEndpoint

Components

  • components/ApiEndpointCard/index.tsx:
    • Removed showCommonSwitch and onCommonChange props
    • Removed "Public endpoint" Switch UI block entirely
    • Removed Switch from imports
  • components/Flow/EdgeTypes/AddEndpointModal.tsx:
    • Removed unused isCommonEndpoint state
    • Removed passedEndpoint.isCommon = isCommonEndpoint from handleSave
    • Removed onCommonChange prop from <ApiEndpointCard>

Services

  • services/endpoint.service.ts — Removed endpoint.isCommon = endpoint.isCommon ?? false default assignment

Pages

  • pages/ServiceFlowPage.tsx — Updated call: loadCommonEndpointsloadAllEndpoints

Types

  • types/endpoint/endpoint-data.ts — Removed isCommon?: boolean field
  • types/service.ts — Removed isCommon from Service.endpoints Pick type (service-level readonly isCommon: boolean on Service interface retained)

i18n

  • i18n/en/common.json — Removed "publicEndpoint" key
  • i18n/et/common.json — Removed "publicEndpoint" key

Ruuter (DSL/Ruuter/)

POST/endpoints/all.yml (renamed from common.yml)

  • Renamed file from common.ymlall.yml
  • Renamed step get_common_endpointsget_paginated_endpoints
  • Updated Resql URL: .../get_common_endpoints.../get_paginated_endpoints
  • Updated description: "Returns all endpoints with pagination, sorting and search support"

Resql (DSL/Resql/services/POST/endpoints/)

get_paginated_endpoints.sql (renamed from get_common_endpoints.sql)

  • Renamed only — content unchanged; returns all non-deleted endpoints with pagination, sorting, and search support; no is_common filter was ever applied

create_endpoint.sql (modified)

  • Removed is_common column from INSERT statement.

update_endpoint.sql (modified)

  • Removed is_common = :isCommon from UPDATE SET clause

Liquibase Migrations (DSL/Liquibase/)

Migration Change
20260504120000_remove-is-common-from-endpoints Drops is_common column from the endpoints table

Includes rollback script: ALTER TABLE endpoints ADD COLUMN IF NOT EXISTS is_common BOOLEAN NOT NULL DEFAULT FALSE.

@matKlju
Copy link
Copy Markdown
Collaborator

matKlju commented May 5, 2026

NB!!!
Current PR #989 has to be merged -->AFTER<-- #983 PR

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
8.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Public/Private Endpoint Distinction

2 participants