Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Each service lives in `pkg/{service_name}/` with:
pkg/petstore/
setup/
openapi.yml # OpenAPI specification
config.yml # Latency, errors, upstream, caching
config.yml # Latency, errors, upstream, replay, caching
codegen.yml # Code generation settings
context.yml # Custom values for mock data
generate.go # go:generate directive
Expand All @@ -74,7 +74,7 @@ pkg/petstore/
## API Explorer UI

The built-in UI is available at `/` (configurable in `resources/data/app.yml`).
It lets you browse services, view specs, test endpoints, and inspect request/response history.
It lets you browse services, view specs, test endpoints, inspect request/response history, and manage replay recordings.

## Local development

Expand Down
2 changes: 2 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ func initRouter() *api.Router {
_ = api.CreateHomeRoutes(router)
_ = api.CreateServiceRoutes(router)
_ = api.CreateHistoryRoutes(router)
_ = api.CreateReplayRoutes(router)
_ = api.CreateServiceConfigRoutes(router)
loader.LoadAll(router)

services := loader.DefaultRegistry.List()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/go-playground/validator/v10 v10.30.1
github.com/joho/godotenv v1.5.1
github.com/lmittmann/tint v1.1.3
github.com/mockzilla/mockzilla/v2 v2.6.1
github.com/mockzilla/mockzilla/v2 v2.7.1
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/lmittmann/tint v1.1.3 h1:Hv4EaHWXQr+GTFnOU4VKf8UvAtZgn0VuKT+G0wFlO3I=
github.com/lmittmann/tint v1.1.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/mockzilla/mockzilla/v2 v2.6.1 h1:DhPX9pd9U6KmWKia+W3c2dK9jPOMgzsH21Y1qgOo/Ro=
github.com/mockzilla/mockzilla/v2 v2.6.1/go.mod h1:zGD4G9Dj1GLw39cDCQZa5CQmUeLNzhBvEYC3ZbGOZ+0=
github.com/mockzilla/mockzilla/v2 v2.7.1 h1:wzK6HlA4pQq5uWP5QlezcKUagXxHrT6Pt7nUNIjYYQA=
github.com/mockzilla/mockzilla/v2 v2.7.1/go.mod h1:zGD4G9Dj1GLw39cDCQZa5CQmUeLNzhBvEYC3ZbGOZ+0=
github.com/pb33f/jsonpath v0.8.2 h1:Ou4C7zjYClBm97dfZjDCjdZGusJoynv/vrtiEKNfj2Y=
github.com/pb33f/jsonpath v0.8.2/go.mod h1:zBV5LJW4OQOPatmQE2QdKpGQJvhDTlE5IEj6ASaRNTo=
github.com/pb33f/libopenapi v0.36.5 h1:Y1FNJ99E+1OW65ijfx447HezNc7vfi9AHYtaPmtj34c=
Expand Down
2 changes: 1 addition & 1 deletion pkg/hello_world/setup/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/mockzilla/mockzilla/refs/heads/master/resources/json-schema-service.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/mockzilla/mockzilla/refs/heads/main/resources/json-schema-service.json
name: hello-world
latency: 0ms
cache:
Expand Down
2 changes: 1 addition & 1 deletion pkg/petstore/setup/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/mockzilla/mockzilla/refs/heads/master/resources/json-schema-service.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/mockzilla/mockzilla/refs/heads/main/resources/json-schema-service.json
name: petstore
latency: 0ms
cache:
Expand Down
14 changes: 10 additions & 4 deletions resources/data/app.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/mockzilla/mockzilla/refs/heads/master/resources/json-schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/mockzilla/mockzilla/refs/heads/main/resources/json-schema.json
port: 2200
homeURL: /

editor:
theme: chrome
darkTheme: cobalt
fontSize: 14

historyDuration: 8h
homeURL: /
history:
enabled: false
duration: 8h

replay:
enabled: false
duration: 24h

## Storage backend: defaults to memory for local development.
## Override with env vars for deployment:
Expand All @@ -18,4 +24,4 @@ homeURL: /
storage:
type: memory
redis:
host: localhost
address: localhost:6379
Loading