Fix swagger endpoint IDs

This commit is contained in:
Ingo Oppermann 2022-07-29 11:24:22 +02:00
parent 542653d3e2
commit 6af226aea7
No known key found for this signature in database
GPG key ID: 2AB32426E9DD229E
6 changed files with 100 additions and 84 deletions

View file

@ -546,7 +546,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Fetch a file from the memory filesystem", "summary": "Fetch a file from the memory filesystem",
"operationId": "memfs-3-get-file-api", "operationId": "memfs-3-get-file",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -592,7 +592,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Add a file to the memory filesystem", "summary": "Add a file to the memory filesystem",
"operationId": "memfs-3-put-file-api", "operationId": "memfs-3-put-file",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -646,7 +646,7 @@ const docTemplate = `{
"text/plain" "text/plain"
], ],
"summary": "Remove a file from the memory filesystem", "summary": "Remove a file from the memory filesystem",
"operationId": "memfs-delete-file-api", "operationId": "memfs-3-delete-file",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -893,7 +893,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "List all known processes", "summary": "List all known processes",
"operationId": "restream-3-get-all", "operationId": "process-3-get-all",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -940,7 +940,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Add a new process", "summary": "Add a new process",
"operationId": "restream-3-add", "operationId": "process-3-add",
"parameters": [ "parameters": [
{ {
"description": "Process config", "description": "Process config",
@ -980,7 +980,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "List a process by its ID", "summary": "List a process by its ID",
"operationId": "restream-3-get", "operationId": "process-3-get",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1025,7 +1025,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Replace an existing process", "summary": "Replace an existing process",
"operationId": "restream-3-update", "operationId": "process-3-update",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1076,7 +1076,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Delete a process by its ID", "summary": "Delete a process by its ID",
"operationId": "restream-3-delete", "operationId": "process-3-delete",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1117,7 +1117,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Issue a command to a process", "summary": "Issue a command to a process",
"operationId": "restream-3-command", "operationId": "process-3-command",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1170,7 +1170,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Get the configuration of a process", "summary": "Get the configuration of a process",
"operationId": "restream-3-get-config", "operationId": "process-3-get-config",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1214,7 +1214,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Retrieve JSON metadata stored with a process under a key", "summary": "Retrieve JSON metadata stored with a process under a key",
"operationId": "restream-3-get-process-metadata", "operationId": "process-3-get-process-metadata",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1261,7 +1261,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Add JSON metadata with a process under the given key", "summary": "Add JSON metadata with a process under the given key",
"operationId": "restream-3-set-process-metadata", "operationId": "process-3-set-process-metadata",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1318,7 +1318,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Encode the errorframe", "summary": "Encode the errorframe",
"operationId": "restream-3-playout-errorframencode", "operationId": "process-3-playout-errorframencode",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1373,7 +1373,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Upload an error frame", "summary": "Upload an error frame",
"operationId": "restream-3-playout-errorframe", "operationId": "process-3-playout-errorframe",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1445,7 +1445,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Get the last keyframe", "summary": "Get the last keyframe",
"operationId": "restream-3-playout-keyframe", "operationId": "process-3-playout-keyframe",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1503,7 +1503,7 @@ const docTemplate = `{
"text/plain" "text/plain"
], ],
"summary": "Close the current input stream", "summary": "Close the current input stream",
"operationId": "restream-3-playout-reopen-input", "operationId": "process-3-playout-reopen-input",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1554,7 +1554,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Get the current playout status", "summary": "Get the current playout status",
"operationId": "restream-3-playout-status", "operationId": "process-3-playout-status",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1609,7 +1609,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Switch to a new stream", "summary": "Switch to a new stream",
"operationId": "restream-3-playout-stream", "operationId": "process-3-playout-stream",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1669,7 +1669,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Probe a process", "summary": "Probe a process",
"operationId": "restream-3-probe", "operationId": "process-3-probe",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1701,7 +1701,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Get the logs of a process", "summary": "Get the logs of a process",
"operationId": "restream-3-get-report", "operationId": "process-3-get-report",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1745,7 +1745,7 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"summary": "Get the state of a process", "summary": "Get the state of a process",
"operationId": "restream-3-get-state", "operationId": "process-3-get-state",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -2609,6 +2609,9 @@ const docTemplate = `{
"address": { "address": {
"type": "string" "type": "string"
}, },
"address_tls": {
"type": "string"
},
"app": { "app": {
"type": "string" "type": "string"
}, },
@ -4203,6 +4206,9 @@ const docTemplate = `{
"address": { "address": {
"type": "string" "type": "string"
}, },
"address_tls": {
"type": "string"
},
"app": { "app": {
"type": "string" "type": "string"
}, },

View file

@ -538,7 +538,7 @@
"application/json" "application/json"
], ],
"summary": "Fetch a file from the memory filesystem", "summary": "Fetch a file from the memory filesystem",
"operationId": "memfs-3-get-file-api", "operationId": "memfs-3-get-file",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -584,7 +584,7 @@
"application/json" "application/json"
], ],
"summary": "Add a file to the memory filesystem", "summary": "Add a file to the memory filesystem",
"operationId": "memfs-3-put-file-api", "operationId": "memfs-3-put-file",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -638,7 +638,7 @@
"text/plain" "text/plain"
], ],
"summary": "Remove a file from the memory filesystem", "summary": "Remove a file from the memory filesystem",
"operationId": "memfs-delete-file-api", "operationId": "memfs-3-delete-file",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -885,7 +885,7 @@
"application/json" "application/json"
], ],
"summary": "List all known processes", "summary": "List all known processes",
"operationId": "restream-3-get-all", "operationId": "process-3-get-all",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -932,7 +932,7 @@
"application/json" "application/json"
], ],
"summary": "Add a new process", "summary": "Add a new process",
"operationId": "restream-3-add", "operationId": "process-3-add",
"parameters": [ "parameters": [
{ {
"description": "Process config", "description": "Process config",
@ -972,7 +972,7 @@
"application/json" "application/json"
], ],
"summary": "List a process by its ID", "summary": "List a process by its ID",
"operationId": "restream-3-get", "operationId": "process-3-get",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1017,7 +1017,7 @@
"application/json" "application/json"
], ],
"summary": "Replace an existing process", "summary": "Replace an existing process",
"operationId": "restream-3-update", "operationId": "process-3-update",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1068,7 +1068,7 @@
"application/json" "application/json"
], ],
"summary": "Delete a process by its ID", "summary": "Delete a process by its ID",
"operationId": "restream-3-delete", "operationId": "process-3-delete",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1109,7 +1109,7 @@
"application/json" "application/json"
], ],
"summary": "Issue a command to a process", "summary": "Issue a command to a process",
"operationId": "restream-3-command", "operationId": "process-3-command",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1162,7 +1162,7 @@
"application/json" "application/json"
], ],
"summary": "Get the configuration of a process", "summary": "Get the configuration of a process",
"operationId": "restream-3-get-config", "operationId": "process-3-get-config",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1206,7 +1206,7 @@
"application/json" "application/json"
], ],
"summary": "Retrieve JSON metadata stored with a process under a key", "summary": "Retrieve JSON metadata stored with a process under a key",
"operationId": "restream-3-get-process-metadata", "operationId": "process-3-get-process-metadata",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1253,7 +1253,7 @@
"application/json" "application/json"
], ],
"summary": "Add JSON metadata with a process under the given key", "summary": "Add JSON metadata with a process under the given key",
"operationId": "restream-3-set-process-metadata", "operationId": "process-3-set-process-metadata",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1310,7 +1310,7 @@
"application/json" "application/json"
], ],
"summary": "Encode the errorframe", "summary": "Encode the errorframe",
"operationId": "restream-3-playout-errorframencode", "operationId": "process-3-playout-errorframencode",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1365,7 +1365,7 @@
"application/json" "application/json"
], ],
"summary": "Upload an error frame", "summary": "Upload an error frame",
"operationId": "restream-3-playout-errorframe", "operationId": "process-3-playout-errorframe",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1437,7 +1437,7 @@
"application/json" "application/json"
], ],
"summary": "Get the last keyframe", "summary": "Get the last keyframe",
"operationId": "restream-3-playout-keyframe", "operationId": "process-3-playout-keyframe",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1495,7 +1495,7 @@
"text/plain" "text/plain"
], ],
"summary": "Close the current input stream", "summary": "Close the current input stream",
"operationId": "restream-3-playout-reopen-input", "operationId": "process-3-playout-reopen-input",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1546,7 +1546,7 @@
"application/json" "application/json"
], ],
"summary": "Get the current playout status", "summary": "Get the current playout status",
"operationId": "restream-3-playout-status", "operationId": "process-3-playout-status",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1601,7 +1601,7 @@
"application/json" "application/json"
], ],
"summary": "Switch to a new stream", "summary": "Switch to a new stream",
"operationId": "restream-3-playout-stream", "operationId": "process-3-playout-stream",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1661,7 +1661,7 @@
"application/json" "application/json"
], ],
"summary": "Probe a process", "summary": "Probe a process",
"operationId": "restream-3-probe", "operationId": "process-3-probe",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1693,7 +1693,7 @@
"application/json" "application/json"
], ],
"summary": "Get the logs of a process", "summary": "Get the logs of a process",
"operationId": "restream-3-get-report", "operationId": "process-3-get-report",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -1737,7 +1737,7 @@
"application/json" "application/json"
], ],
"summary": "Get the state of a process", "summary": "Get the state of a process",
"operationId": "restream-3-get-state", "operationId": "process-3-get-state",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -2601,6 +2601,9 @@
"address": { "address": {
"type": "string" "type": "string"
}, },
"address_tls": {
"type": "string"
},
"app": { "app": {
"type": "string" "type": "string"
}, },
@ -4195,6 +4198,9 @@
"address": { "address": {
"type": "string" "type": "string"
}, },
"address_tls": {
"type": "string"
},
"app": { "app": {
"type": "string" "type": "string"
}, },

View file

@ -264,6 +264,8 @@ definitions:
properties: properties:
address: address:
type: string type: string
address_tls:
type: string
app: app:
type: string type: string
enable: enable:
@ -1367,6 +1369,8 @@ definitions:
properties: properties:
address: address:
type: string type: string
address_tls:
type: string
app: app:
type: string type: string
enable: enable:
@ -2047,7 +2051,7 @@ paths:
/api/v3/fs/mem/{path}: /api/v3/fs/mem/{path}:
delete: delete:
description: Remove a file from the memory filesystem description: Remove a file from the memory filesystem
operationId: memfs-delete-file-api operationId: memfs-3-delete-file
parameters: parameters:
- description: Path to file - description: Path to file
in: path in: path
@ -2070,7 +2074,7 @@ paths:
summary: Remove a file from the memory filesystem summary: Remove a file from the memory filesystem
get: get:
description: Fetch a file from the memory filesystem description: Fetch a file from the memory filesystem
operationId: memfs-3-get-file-api operationId: memfs-3-get-file
parameters: parameters:
- description: Path to file - description: Path to file
in: path in: path
@ -2133,7 +2137,7 @@ paths:
consumes: consumes:
- application/data - application/data
description: Writes or overwrites a file on the memory filesystem description: Writes or overwrites a file on the memory filesystem
operationId: memfs-3-put-file-api operationId: memfs-3-put-file
parameters: parameters:
- description: Path to file - description: Path to file
in: path in: path
@ -2276,7 +2280,7 @@ paths:
get: get:
description: List all known processes. Use the query parameter to filter the description: List all known processes. Use the query parameter to filter the
listed processes. listed processes.
operationId: restream-3-get-all operationId: process-3-get-all
parameters: parameters:
- description: Comma separated list of fields (config, state, report, metadata) - description: Comma separated list of fields (config, state, report, metadata)
that will be part of the output. If empty, all fields will be part of the that will be part of the output. If empty, all fields will be part of the
@ -2309,7 +2313,7 @@ paths:
consumes: consumes:
- application/json - application/json
description: Add a new FFmpeg process description: Add a new FFmpeg process
operationId: restream-3-add operationId: process-3-add
parameters: parameters:
- description: Process config - description: Process config
in: body in: body
@ -2334,7 +2338,7 @@ paths:
/api/v3/process/{id}: /api/v3/process/{id}:
delete: delete:
description: Delete a process by its ID description: Delete a process by its ID
operationId: restream-3-delete operationId: process-3-delete
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2358,7 +2362,7 @@ paths:
get: get:
description: List a process by its ID. Use the filter parameter to specifiy description: List a process by its ID. Use the filter parameter to specifiy
the level of detail of the output. the level of detail of the output.
operationId: restream-3-get operationId: process-3-get
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2388,7 +2392,7 @@ paths:
consumes: consumes:
- application/json - application/json
description: Replace an existing process. This is a shortcut for DELETE+POST. description: Replace an existing process. This is a shortcut for DELETE+POST.
operationId: restream-3-update operationId: process-3-update
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2424,7 +2428,7 @@ paths:
consumes: consumes:
- application/json - application/json
description: 'Issue a command to a process: start, stop, reload, restart' description: 'Issue a command to a process: start, stop, reload, restart'
operationId: restream-3-command operationId: process-3-command
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2459,7 +2463,7 @@ paths:
get: get:
description: Get the configuration of a process. This is the configuration as description: Get the configuration of a process. This is the configuration as
provided by Add or Update. provided by Add or Update.
operationId: restream-3-get-config operationId: process-3-get-config
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2488,7 +2492,7 @@ paths:
get: get:
description: Retrieve the previously stored JSON metadata under the given key. description: Retrieve the previously stored JSON metadata under the given key.
If the key is empty, all metadata will be returned. If the key is empty, all metadata will be returned.
operationId: restream-3-get-process-metadata operationId: process-3-get-process-metadata
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2521,7 +2525,7 @@ paths:
description: Add arbitrary JSON metadata under the given key. If the key exists, description: Add arbitrary JSON metadata under the given key. If the key exists,
all already stored metadata with this key will be overwritten. If the key all already stored metadata with this key will be overwritten. If the key
doesn't exist, it will be created. doesn't exist, it will be created.
operationId: restream-3-set-process-metadata operationId: process-3-set-process-metadata
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2561,7 +2565,7 @@ paths:
consumes: consumes:
- application/octet-stream - application/octet-stream
description: Upload an error frame which will be encoded immediately description: Upload an error frame which will be encoded immediately
operationId: restream-3-playout-errorframe operationId: process-3-playout-errorframe
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2608,7 +2612,7 @@ paths:
/api/v3/process/{id}/playout/{inputid}/errorframe/encode: /api/v3/process/{id}/playout/{inputid}/errorframe/encode:
get: get:
description: Immediately encode the errorframe (if available and looping) description: Immediately encode the errorframe (if available and looping)
operationId: restream-3-playout-errorframencode operationId: process-3-playout-errorframencode
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2643,7 +2647,7 @@ paths:
get: get:
description: Get the last keyframe of an input of a process. The extension of description: Get the last keyframe of an input of a process. The extension of
the name determines the return type. the name determines the return type.
operationId: restream-3-playout-keyframe operationId: process-3-playout-keyframe
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2684,7 +2688,7 @@ paths:
get: get:
description: Close the current input stream such that it will be automatically description: Close the current input stream such that it will be automatically
re-opened re-opened
operationId: restream-3-playout-reopen-input operationId: process-3-playout-reopen-input
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2717,7 +2721,7 @@ paths:
/api/v3/process/{id}/playout/{inputid}/status: /api/v3/process/{id}/playout/{inputid}/status:
get: get:
description: Get the current playout status of an input of a process description: Get the current playout status of an input of a process
operationId: restream-3-playout-status operationId: process-3-playout-status
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2753,7 +2757,7 @@ paths:
- text/plain - text/plain
description: Replace the current stream with the one from the given URL. The description: Replace the current stream with the one from the given URL. The
switch will only happen if the stream parameters match. switch will only happen if the stream parameters match.
operationId: restream-3-playout-stream operationId: process-3-playout-stream
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2794,7 +2798,7 @@ paths:
get: get:
description: Probe an existing process to get a detailed stream information description: Probe an existing process to get a detailed stream information
on the inputs on the inputs
operationId: restream-3-probe operationId: process-3-probe
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2814,7 +2818,7 @@ paths:
/api/v3/process/{id}/report: /api/v3/process/{id}/report:
get: get:
description: Get the logs and the log history of a process description: Get the logs and the log history of a process
operationId: restream-3-get-report operationId: process-3-get-report
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path
@ -2842,7 +2846,7 @@ paths:
/api/v3/process/{id}/state: /api/v3/process/{id}/state:
get: get:
description: Get the state and progress data of a process description: Get the state and progress data of a process
operationId: restream-3-get-state operationId: process-3-get-state
parameters: parameters:
- description: Process ID - description: Process ID
in: path in: path

View file

@ -31,7 +31,7 @@ func NewMemFS(fs fs.Filesystem) *MemFSHandler {
// GetFileAPI returns the file at the given path // GetFileAPI returns the file at the given path
// @Summary Fetch a file from the memory filesystem // @Summary Fetch a file from the memory filesystem
// @Description Fetch a file from the memory filesystem // @Description Fetch a file from the memory filesystem
// @ID memfs-3-get-file-api // @ID memfs-3-get-file
// @Produce application/data // @Produce application/data
// @Produce json // @Produce json
// @Param path path string true "Path to file" // @Param path path string true "Path to file"
@ -47,7 +47,7 @@ func (h *MemFSHandler) GetFile(c echo.Context) error {
// PutFileAPI adds or overwrites a file at the given path // PutFileAPI adds or overwrites a file at the given path
// @Summary Add a file to the memory filesystem // @Summary Add a file to the memory filesystem
// @Description Writes or overwrites a file on the memory filesystem // @Description Writes or overwrites a file on the memory filesystem
// @ID memfs-3-put-file-api // @ID memfs-3-put-file
// @Accept application/data // @Accept application/data
// @Produce text/plain // @Produce text/plain
// @Produce json // @Produce json
@ -65,7 +65,7 @@ func (h *MemFSHandler) PutFile(c echo.Context) error {
// DeleteFileAPI removes a file from the filesystem // DeleteFileAPI removes a file from the filesystem
// @Summary Remove a file from the memory filesystem // @Summary Remove a file from the memory filesystem
// @Description Remove a file from the memory filesystem // @Description Remove a file from the memory filesystem
// @ID memfs-delete-file-api // @ID memfs-3-delete-file
// @Produce text/plain // @Produce text/plain
// @Param path path string true "Path to file" // @Param path path string true "Path to file"
// @Success 200 {string} string // @Success 200 {string} string

View file

@ -31,7 +31,7 @@ func NewPlayout(restream restream.Restreamer) *PlayoutHandler {
// Status return the current playout status // Status return the current playout status
// @Summary Get the current playout status // @Summary Get the current playout status
// @Description Get the current playout status of an input of a process // @Description Get the current playout status of an input of a process
// @ID restream-3-playout-status // @ID process-3-playout-status
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Param inputid path string true "Process Input ID" // @Param inputid path string true "Process Input ID"
@ -84,7 +84,7 @@ func (h *PlayoutHandler) Status(c echo.Context) error {
// Keyframe returns the last keyframe // Keyframe returns the last keyframe
// @Summary Get the last keyframe // @Summary Get the last keyframe
// @Description Get the last keyframe of an input of a process. The extension of the name determines the return type. // @Description Get the last keyframe of an input of a process. The extension of the name determines the return type.
// @ID restream-3-playout-keyframe // @ID process-3-playout-keyframe
// @Produce image/jpeg // @Produce image/jpeg
// @Produce image/png // @Produce image/png
// @Produce json // @Produce json
@ -133,7 +133,7 @@ func (h *PlayoutHandler) Keyframe(c echo.Context) error {
// EncodeErrorframe encodes the errorframe // EncodeErrorframe encodes the errorframe
// @Summary Encode the errorframe // @Summary Encode the errorframe
// @Description Immediately encode the errorframe (if available and looping) // @Description Immediately encode the errorframe (if available and looping)
// @ID restream-3-playout-errorframencode // @ID process-3-playout-errorframencode
// @Produce text/plain // @Produce text/plain
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
@ -173,7 +173,7 @@ func (h *PlayoutHandler) EncodeErrorframe(c echo.Context) error {
// SetErrorframe sets an errorframe // SetErrorframe sets an errorframe
// @Summary Upload an error frame // @Summary Upload an error frame
// @Description Upload an error frame which will be encoded immediately // @Description Upload an error frame which will be encoded immediately
// @ID restream-3-playout-errorframe // @ID process-3-playout-errorframe
// @Produce text/plain // @Produce text/plain
// @Produce json // @Produce json
// @Accept application/octet-stream // @Accept application/octet-stream
@ -221,7 +221,7 @@ func (h *PlayoutHandler) SetErrorframe(c echo.Context) error {
// ReopenInput closes the current input stream // ReopenInput closes the current input stream
// @Summary Close the current input stream // @Summary Close the current input stream
// @Description Close the current input stream such that it will be automatically re-opened // @Description Close the current input stream such that it will be automatically re-opened
// @ID restream-3-playout-reopen-input // @ID process-3-playout-reopen-input
// @Produce plain // @Produce plain
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Param inputid path string true "Process Input ID" // @Param inputid path string true "Process Input ID"
@ -260,7 +260,7 @@ func (h *PlayoutHandler) ReopenInput(c echo.Context) error {
// SetStream replaces the current stream // SetStream replaces the current stream
// @Summary Switch to a new stream // @Summary Switch to a new stream
// @Description Replace the current stream with the one from the given URL. The switch will only happen if the stream parameters match. // @Description Replace the current stream with the one from the given URL. The switch will only happen if the stream parameters match.
// @ID restream-3-playout-stream // @ID process-3-playout-stream
// @Produce text/plain // @Produce text/plain
// @Produce json // @Produce json
// @Accept text/plain // @Accept text/plain

View file

@ -27,7 +27,7 @@ func NewRestream(restream restream.Restreamer) *RestreamHandler {
// Add adds a new process // Add adds a new process
// @Summary Add a new process // @Summary Add a new process
// @Description Add a new FFmpeg process // @Description Add a new FFmpeg process
// @ID restream-3-add // @ID process-3-add
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param config body api.ProcessConfig true "Process config" // @Param config body api.ProcessConfig true "Process config"
@ -68,7 +68,7 @@ func (h *RestreamHandler) Add(c echo.Context) error {
// GetAll returns all known processes // GetAll returns all known processes
// @Summary List all known processes // @Summary List all known processes
// @Description List all known processes. Use the query parameter to filter the listed processes. // @Description List all known processes. Use the query parameter to filter the listed processes.
// @ID restream-3-get-all // @ID process-3-get-all
// @Produce json // @Produce json
// @Param filter query string false "Comma separated list of fields (config, state, report, metadata) that will be part of the output. If empty, all fields will be part of the output" // @Param filter query string false "Comma separated list of fields (config, state, report, metadata) that will be part of the output. If empty, all fields will be part of the output"
// @Param reference query string false "Return only these process that have this reference value. Overrides a list of IDs. If empty, the reference will be ignored" // @Param reference query string false "Return only these process that have this reference value. Overrides a list of IDs. If empty, the reference will be ignored"
@ -114,7 +114,7 @@ func (h *RestreamHandler) GetAll(c echo.Context) error {
// Get returns the process with the given ID // Get returns the process with the given ID
// @Summary List a process by its ID // @Summary List a process by its ID
// @Description List a process by its ID. Use the filter parameter to specifiy the level of detail of the output. // @Description List a process by its ID. Use the filter parameter to specifiy the level of detail of the output.
// @ID restream-3-get // @ID process-3-get
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Param filter query string false "Comma separated list of fields (config, state, report, metadata) to be part of the output. If empty, all fields will be part of the output" // @Param filter query string false "Comma separated list of fields (config, state, report, metadata) to be part of the output. If empty, all fields will be part of the output"
@ -137,7 +137,7 @@ func (h *RestreamHandler) Get(c echo.Context) error {
// Delete deletes the process with the given ID // Delete deletes the process with the given ID
// @Summary Delete a process by its ID // @Summary Delete a process by its ID
// @Description Delete a process by its ID // @Description Delete a process by its ID
// @ID restream-3-delete // @ID process-3-delete
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Success 200 {string} string // @Success 200 {string} string
@ -161,7 +161,7 @@ func (h *RestreamHandler) Delete(c echo.Context) error {
// Update replaces an existing process // Update replaces an existing process
// @Summary Replace an existing process // @Summary Replace an existing process
// @Description Replace an existing process. This is a shortcut for DELETE+POST. // @Description Replace an existing process. This is a shortcut for DELETE+POST.
// @ID restream-3-update // @ID process-3-update
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
@ -202,7 +202,7 @@ func (h *RestreamHandler) Update(c echo.Context) error {
// Command issues a command to a process // Command issues a command to a process
// @Summary Issue a command to a process // @Summary Issue a command to a process
// @Description Issue a command to a process: start, stop, reload, restart // @Description Issue a command to a process: start, stop, reload, restart
// @ID restream-3-command // @ID process-3-command
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
@ -244,7 +244,7 @@ func (h *RestreamHandler) Command(c echo.Context) error {
// GetConfig returns the configuration of a process // GetConfig returns the configuration of a process
// @Summary Get the configuration of a process // @Summary Get the configuration of a process
// @Description Get the configuration of a process. This is the configuration as provided by Add or Update. // @Description Get the configuration of a process. This is the configuration as provided by Add or Update.
// @ID restream-3-get-config // @ID process-3-get-config
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Success 200 {object} api.ProcessConfig // @Success 200 {object} api.ProcessConfig
@ -269,7 +269,7 @@ func (h *RestreamHandler) GetConfig(c echo.Context) error {
// GetState returns the current state of a process // GetState returns the current state of a process
// @Summary Get the state of a process // @Summary Get the state of a process
// @Description Get the state and progress data of a process // @Description Get the state and progress data of a process
// @ID restream-3-get-state // @ID process-3-get-state
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Success 200 {object} api.ProcessState // @Success 200 {object} api.ProcessState
@ -294,7 +294,7 @@ func (h *RestreamHandler) GetState(c echo.Context) error {
// GetReport return the current log and the log history of a process // GetReport return the current log and the log history of a process
// @Summary Get the logs of a process // @Summary Get the logs of a process
// @Description Get the logs and the log history of a process // @Description Get the logs and the log history of a process
// @ID restream-3-get-report // @ID process-3-get-report
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Success 200 {object} api.ProcessReport // @Success 200 {object} api.ProcessReport
@ -319,7 +319,7 @@ func (h *RestreamHandler) GetReport(c echo.Context) error {
// Probe probes a process // Probe probes a process
// @Summary Probe a process // @Summary Probe a process
// @Description Probe an existing process to get a detailed stream information on the inputs // @Description Probe an existing process to get a detailed stream information on the inputs
// @ID restream-3-probe // @ID process-3-probe
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Success 200 {object} api.Probe // @Success 200 {object} api.Probe
@ -374,7 +374,7 @@ func (h *RestreamHandler) ReloadSkills(c echo.Context) error {
// GetProcessMetadata returns the metadata stored with a process // GetProcessMetadata returns the metadata stored with a process
// @Summary Retrieve JSON metadata stored with a process under a key // @Summary Retrieve JSON metadata stored with a process under a key
// @Description Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned. // @Description Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned.
// @ID restream-3-get-process-metadata // @ID process-3-get-process-metadata
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Param key path string true "Key for data store" // @Param key path string true "Key for data store"
@ -398,7 +398,7 @@ func (h *RestreamHandler) GetProcessMetadata(c echo.Context) error {
// SetProcessMetadata stores metadata with a process // SetProcessMetadata stores metadata with a process
// @Summary Add JSON metadata with a process under the given key // @Summary Add JSON metadata with a process under the given key
// @Description Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created. // @Description Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created.
// @ID restream-3-set-process-metadata // @ID process-3-set-process-metadata
// @Produce json // @Produce json
// @Param id path string true "Process ID" // @Param id path string true "Process ID"
// @Param key path string true "Key for data store" // @Param key path string true "Key for data store"