thefrontside / simulacrum

A simulation platform for use during testing, during development and for high-fidelity application previews
91 stars 14 forks source link

add simulationRoutes to store, display at base / route #280

Closed jbolda closed 1 month ago

jbolda commented 3 months ago

Motivation

To improve transparency and flexibility, we include a page at the root that lists all of the routes, and the ability to signal which response to return.

Approach

Pipe OpenAPI routes into the simulation store. Return these items through a small form to adjust that state. Also, pipe that state into the OpenAPI handlers to improve the usability.

Example

Screenshot 2024-08-27 at 4 49 33 PM

frontsidejack commented 3 months ago

Package Changes Through 2f42d898d4bbe8227aff140407eb64dd230e924c

There are 1 changes which include @simulacrum/foundation-simulator with minor

Planned Package Versions The following package releases are the planned based on the context of changes in this pull request. | package | current | next | |----|----|----| | @simulacrum/foundation-simulator | 0.1.0 | 0.2.0 |

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

frontsidejack commented 3 months ago

The following preview packages have been published by Covector:

  • @simulacrum/foundation-simulator@0.1.0-foundation-simulator-route-list.ab1c616

ab1c616

jbolda commented 2 months ago

We still want to handle the routes configured through extendRouter. After this, we can review and merge.