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

@@ -5125,10 +5125,7 @@
"$ref": "#/definitions/MockResponse"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/routeApi.RawRule"
},
"type": "string",
"x-nullable": false,
"x-omitempty": false
}
@@ -6926,28 +6923,6 @@
"x-nullable": false,
"x-omitempty": false
},
"routeApi.RawRule": {
"type": "object",
"properties": {
"do": {
"type": "string",
"x-nullable": false,
"x-omitempty": false
},
"name": {
"type": "string",
"x-nullable": false,
"x-omitempty": false
},
"on": {
"type": "string",
"x-nullable": false,
"x-omitempty": false
}
},
"x-nullable": false,
"x-omitempty": false
},
"routeApi.RoutesByProvider": {
"type": "object",
"additionalProperties": {