feat(api): accept rule config block string in playground

Update playground request to take rules as a string and parse
either YAML list or DSL config, with tests and swagger updates.
This commit is contained in:
yusing
2026-02-24 18:11:17 +08:00
parent 0eba045104
commit ed2ca236b0
4 changed files with 110 additions and 75 deletions

View File

@@ -905,9 +905,7 @@ definitions:
mockResponse:
$ref: '#/definitions/MockResponse'
rules:
items:
$ref: '#/definitions/routeApi.RawRule'
type: array
type: string
required:
- rules
type: object
@@ -1858,15 +1856,6 @@ definitions:
uptime:
type: string
type: object
routeApi.RawRule:
properties:
do:
type: string
name:
type: string
"on":
type: string
type: object
routeApi.RoutesByProvider:
additionalProperties:
items: