Fix omitting empty cleanup rules

This commit is contained in:
Ingo Oppermann
2025-05-15 12:17:17 +02:00
parent d5c03932b5
commit cc0da080c6
5 changed files with 142 additions and 4 deletions

View File

@@ -3597,7 +3597,7 @@ const docTemplate = `{
"tags": [
"v16.?.?"
],
"summary": "Add a new process",
"summary": "Probe a process config",
"operationId": "process-3-probe-config",
"parameters": [
{
@@ -3632,6 +3632,58 @@ const docTemplate = `{
}
}
},
"/api/v3/process/validate": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Probe a process to get a detailed stream information on the inputs.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "Validate a process config",
"operationId": "process-3-validate-config",
"parameters": [
{
"description": "Process config",
"name": "config",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.ProcessConfig"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/api.Probe"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/api/v3/process/{id}": {
"get": {
"security": [

View File

@@ -3590,7 +3590,7 @@
"tags": [
"v16.?.?"
],
"summary": "Add a new process",
"summary": "Probe a process config",
"operationId": "process-3-probe-config",
"parameters": [
{
@@ -3625,6 +3625,58 @@
}
}
},
"/api/v3/process/validate": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Probe a process to get a detailed stream information on the inputs.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "Validate a process config",
"operationId": "process-3-validate-config",
"parameters": [
{
"description": "Process config",
"name": "config",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.ProcessConfig"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/api.Probe"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/api/v3/process/{id}": {
"get": {
"security": [

View File

@@ -5964,7 +5964,40 @@ paths:
$ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: Add a new process
summary: Probe a process config
tags:
- v16.?.?
/api/v3/process/validate:
post:
consumes:
- application/json
description: Probe a process to get a detailed stream information on the inputs.
operationId: process-3-validate-config
parameters:
- description: Process config
in: body
name: config
required: true
schema:
$ref: '#/definitions/api.ProcessConfig'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.Probe'
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.Error'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: Validate a process config
tags:
- v16.?.?
/api/v3/report/process:

View File

@@ -144,7 +144,7 @@ type ProcessConfigIO struct {
ID string `json:"id"`
Address string `json:"address" validate:"required" jsonschema:"minLength=1"`
Options []string `json:"options"`
Cleanup []ProcessConfigIOCleanup `json:"cleanup,omitempty"`
Cleanup []ProcessConfigIOCleanup `json:"cleanup"`
}
type ProcessConfigIOCleanup struct {

View File

@@ -303,6 +303,7 @@ func (h *ProcessHandler) Update(c echo.Context) error {
process := api.ProcessConfig{
ID: id,
Owner: ctxuser,
Domain: domain,
Type: "ffmpeg",
Autostart: true,
}