Add a `GET /api/v1/simulator/scenarios` endpoint to list available simulation scenarios
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- nodejs, typescript
Research direction
Start in src/simulator/, reading simulator.controller.ts, simulator.service.ts, simulation.dto.ts and simulation.entity.ts to see where scenarios are defined today, and check the README around line 241. Add the two GET routes and a typed scenario registry, then extend the colocated spec. Done when both endpoints return the documented fields without seeds or internal state, and docs/ and docs/openapi.json are updated. Whether the endpoints need authentication is not settled in the issue, so confirm that first.
Written by the indexing model from the issue text.
Description
Problem
src/simulator/ has 6 files: simulator.controller.ts, simulator.module.ts, simulator.service.ts, simulation.dto.ts, simulation.entity.ts, and a spec. The README (line 241) says "Use the simulator environment for safe, deterministic testing before enabling live on-chain submission."
But there is no documented way to discover what simulation scenarios exist. A client must know the scenario ids in advance, which means the simulator is only usable by clients that have read the source code.
Why it matters
Discovery is the difference between a simulator that is usable and one that is a developer tool. If a client can list scenarios with their parameters and expected outcomes, it can offer a UI for choosing and running simulations — which is the README's "safe, deterministic testing" promise made real.
Suggested Direction
- Add
GET /api/v1/simulator/scenariosreturning{ id, name, description, parameters, expectedOutcome }per scenario. - Add
GET /api/v1/simulator/scenarios/:idfor full details. - If scenarios are defined in code, expose them as a typed registry rather than hardcoding in the controller.
- Document the endpoint in
docs/and add@ApiResponsedecorators. - Add a colocated spec.
Constraints
- Scenario definitions must be typed and validated.
- Do not expose internal simulation state or seeds in the list response.
- The endpoint should be read-only and unauthenticated if scenarios are not sensitive, or authenticated if they reveal internal configuration.
Acceptance Criteria
-
GET /api/v1/simulator/scenariosreturns a list of available scenarios. - Each scenario includes its parameters and expected outcome.
-
GET /api/v1/simulator/scenarios/:idreturns full details. - The endpoint is documented in
docs/and indocs/openapi.json. - A colocated spec covers the controller.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 55
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SourceXXL/alian_structure-api
-
good first issue help wanted security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#266 ·
-
Parallelize the cache-warming loop in `cache-warming.service.ts` — warmers run strictly sequentiallyMay be free again @syntaxsuuvam-spec claimed this 17 days ago, and no pull request is open. Opengood first issue performance
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#240 ·
-
documentation help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
SourceXXL/alian_structure-api#215 ·
-
good first issue refactor tooling
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
SourceXXL/alian_structure-api#199 ·
-
help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SourceXXL/alian_structure-api#196 ·
All issues in SourceXXL/alian_structure-api
Similar issues
-
[Bug]: Pen taps on sidebar rows start a drag and lose their clickPossibly taken @makhnatkin claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
b310-digital/teammapper#1515 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
puckeditor/puck#1884 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
outline/outline#14378 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nicobailon/pi-web-access#642 ·
Maintainers usually reply within 1 day