ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.28k stars 632 forks source link

Swagger has wrong values for enum fields in Broadcast definition #6740

Open Himpoke opened 1 week ago

Himpoke commented 1 week ago

Short description

The generated swagger lists a single value for these fields, instead of an enum of those values. Broadcast.status Broadcast.playListStatus Broadcast.type Broadcast.publishType

This is due to the allowed values for these are set as a single string with commas in.

The effect of this is that we can't do correct code generation on the generated swagger file. We first must do some regex magic to make the file usable.

I actually already opened a pull request for this, but I didn't know if that's an acceptable way to request changes https://github.com/ant-media/Ant-Media-Server/pull/6739

Environment

Steps to reproduce

  1. Download the swagger file
  2. Find: enum, the Broadcast properties should be the first you find.
  3. See the enum array in the fields listed.

Expected behavior

            "enum": [
              "finished","broadcasting","created","preparing","error","failed"
            ]

Actual behavior

            "enum": [
              "finished,broadcasting,created,preparing,error,failed"
            ]

Logs

no relevant logs

burak-58 commented 1 day ago

Thank you @Himpoke for the report and pull request. Let us check it and merge. Also personally I want to thank for the contribution.