Incorrect API response type

Post your questions here and we'll all try to help.
Post Reply
HiiragiNil
Posts: 4
Joined: Thu Dec 23, 2021 09:05

Incorrect API response type

Post by HiiragiNil »

Hi, thank you for adding REST API! This could be gamechanger for developers.
I'm working on developing REST API with Golang(https://github.com/FlowingSPDG/resolume-go).

I found that "value" field in "BooleanParameter" struct is not actual boolean value.
When I access http://localhost:8080/api/v1/composition , Actual BooleanParameter value is "Empty", which is not boolean.

I'm still trying to find more possible bugs, will post here if I found any.

Zoltán
Team Resolume
Posts: 7599
Joined: Thu Jan 09, 2014 13:08
Location: Székesfehérvár, Hungary

Re: Incorrect API response type

Post by Zoltán »

"bypassed":{"valuetype":"ParamBoolean","id":1640951645300,"value":false} is what I see a lot.

Do you have a specific composition where it says empty for you for bool?
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu

HiiragiNil
Posts: 4
Joined: Thu Dec 23, 2021 09:05

Re: Incorrect API response type

Post by HiiragiNil »

This bug can be replicated on MacOS Catalina 10.15.7 with Resolume Arena v7.8.0.
I had this bug on example project (/Users/flowingspdg/Documents/Resolume Arena/Compositions/Example.avc).

Here is full JSON response of /api/v1/composition .
https://pastebin.ubuntu.com/p/J2gtKCDdkm/plain/


I guess "Clip" has incorrect type.
layers.clips.connected type should be "BooleanParameter" but it has "ParamState" type, which is not defined in swagger.

"connected":{
"id":1641335430528,
"valuetype":"ParamState",
"options":[
"Empty",
"Disconnected",
"Previewing",
"Connected",
"Connected & previewing"
],
"index":1,
"value":"Disconnected",
"id":1641335430527
},

https://user-images.githubusercontent.c ... 3e122f.png
https://user-images.githubusercontent.c ... ac7800.png
https://user-images.githubusercontent.c ... fbf9c3.png

Zoltán
Team Resolume
Posts: 7599
Joined: Thu Jan 09, 2014 13:08
Location: Székesfehérvár, Hungary

Re: Incorrect API response type

Post by Zoltán »

A clip slot can be connected multiple ways, like the list explains. It should not be a bool.
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu

HiiragiNil
Posts: 4
Joined: Thu Dec 23, 2021 09:05

Re: Incorrect API response type

Post by HiiragiNil »

I see, okay then I need correct swagger yaml for generating correct typed codes.
The problem is not if its bool or not, it is different type from swagger.yaml's type definition.
My Go project codes are generated automatically by reading swagger's types, so if type is not matched my code will be broken. Otherwise I have to fix them by myself, which means swagger is not working.

Zoltán
Team Resolume
Posts: 7599
Joined: Thu Jan 09, 2014 13:08
Location: Székesfehérvár, Hungary

Re: Incorrect API response type

Post by Zoltán »

Hmm, I see what you mean now.
I'll make a ticket.
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu

HiiragiNil
Posts: 4
Joined: Thu Dec 23, 2021 09:05

Re: Incorrect API response type

Post by HiiragiNil »

Thank you! imo swagger is best API definition tool because many tool supports auto code generation.
I just wanted to tell you it is awesome to have auto-generate work for many programmers/developers.
API looks game changer for resolume users, thanks and keep it up! ;)

Post Reply