-
Notifications
You must be signed in to change notification settings - Fork 15
Description
AS A Service-Module admin / service creator
I WANT one reusable endpoint creation modal for both Service-Module and API varamu
SO THAT endpoint creation is consistent and saved globally.
Prototype
---Acceptance Criteria
1. Scope
- One shared modal used in Service flow (endpoint creation context)
- One shared modal used in API varamu (global registry context)
- Same UI in both contexts
- Same validation rules in both contexts
- Same backend logic in both contexts
- Save always writes to the global endpoint store
2. Modal Structure
2.1 Header
- Title is “Uus otspunkt / New endpoint”
- Top-left badge “Globaalne / Global” is visible - italic
- Global badge is informational (non-editable)
- Tooltip is implemented and shown on hover
Tooltip Content
ET:
Globaalne otspunkt salvestatakse API varamusse ja kasutab ühtset andmeallikat. Lisades selle teenuse lõuendile luuakse lokaalne koopia, mida globaalse otspunkti muutmine automaatselt ei uuenda; koopiat saab muuta otse lõuendil.
EN:
The global endpoint is stored in the API Registry and uses a single shared data source. When added to a service canvas, a local copy is created that is not automatically updated when the global endpoint changes; the copy can be edited directly on the canvas.
3. Fields & Validation
*= mandatory. All mandatory fields must be valid before Save becomes active.
3.1 Core Fields
- Tüüp / Type* dropdown implemented and cannot be empty
- Nimetus / Name* required and trimmed (non-empty)
- Kirjeldus / Description optional
- Avalikkus / Visibility dropdown implemented (Public / Private)
- Default visibility defined as Private
- URL* section implemented
- Method* (GET / POST) mandatory selection
4. Request Configuration
- Params / Header / Body sections implemented
- Add/remove row functionality works (variable, operator, value)
- None mandatory by default
- Validation applies only if entries are added
5. Test URL Logic
- Test URL executes backend verification
- 2xx response shows response preview
- 2xx unlocks Save (if mandatory fields valid)
- Non-2xx shows HTTP status code + short message
- Non-2xx keeps Save locked (if blocking rule applied)
6. Button Rules
Save
- Save disabled until all mandatory (*) fields are valid
- Save disabled until Test URL has been pressed at least once
Cancel
- Tühista / Cancel closes modal
- Unsaved changes are discarded
7. Definition of Done
- Single modal reused in both contexts
- Global badge + tooltip implemented
- Mandatory (*) validation enforced
- URL format validation implemented
- Test URL correctly handles 2xx / non-2xx
Metadata
Metadata
Assignees
Labels
Type
Projects
Status


