1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-06 18:32:45 +00:00

[2/3] update openapi spec: generate code

This updates the openapi spec and invokes the code generator to update
to the Jellyfin 10.10.6 API.

A big motivation to do this was because some mandatory fields have been
made obsolete and are no longer included in responses. Sailfin tries to
deserialize these mandatory fields and fails deserializing. It was evident
in the list of sessions to control.

The failing was a bit too gracefully in my opinion, it did not even show
that an error occurred, nor was it logged anywhere. It took some time
to debug.
This commit is contained in:
Chris Josten 2025-03-13 02:39:07 +01:00 committed by Chris Josten
parent f71c7a991b
commit 9e1a20cd3a
504 changed files with 62190 additions and 41202 deletions

View file

@ -35,10 +35,12 @@ namespace DTO {
GeneralCommand::GeneralCommand() {}
GeneralCommand::GeneralCommand (
GeneralCommandType name,
QString controllingUserId
QString controllingUserId,
QJsonObject arguments
) :
m_name(name),
m_controllingUserId(controllingUserId) { }
m_controllingUserId(controllingUserId),
m_arguments(arguments) { }
@ -74,11 +76,7 @@ QJsonObject GeneralCommand::toJson() const {
result["Name"] = Jellyfin::Support::toJsonValue<GeneralCommandType>(m_name);
result["ControllingUserId"] = Jellyfin::Support::toJsonValue<QString>(m_controllingUserId);
if (!(m_arguments.isEmpty())) {
result["Arguments"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_arguments);
}
result["Arguments"] = Jellyfin::Support::toJsonValue<QJsonObject>(m_arguments);
return result;
}
@ -99,14 +97,7 @@ QJsonObject GeneralCommand::arguments() const { return m_arguments; }
void GeneralCommand::setArguments(QJsonObject newArguments) {
m_arguments = newArguments;
}
bool GeneralCommand::argumentsNull() const {
return m_arguments.isEmpty();
}
void GeneralCommand::setArgumentsNull() {
m_arguments= QJsonObject();
}
} // NS DTO