Added type to rest api

master
Andrew DeMaria 8 years ago
parent b53f8eef17
commit 312774de9b
  1. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/JAXBWriter.java
  2. 3
      libresonic-rest-api/src/main/resources/libresonic-rest-api.xsd

@ -104,6 +104,7 @@ public class JAXBWriter {
Response response = new ObjectFactory().createResponse(); Response response = new ObjectFactory().createResponse();
response.setStatus(ok ? ResponseStatus.OK : ResponseStatus.FAILED); response.setStatus(ok ? ResponseStatus.OK : ResponseStatus.FAILED);
response.setVersion(restProtocolVersion); response.setVersion(restProtocolVersion);
response.setType("Libresonic");
return response; return response;
} }

@ -4,7 +4,7 @@
targetNamespace="http://libresonic.org/restapi" targetNamespace="http://libresonic.org/restapi"
attributeFormDefault="unqualified" attributeFormDefault="unqualified"
elementFormDefault="qualified" elementFormDefault="qualified"
version="1.13.0"> version="1.14.0">
<xs:element name="subsonic-response" type="sub:Response"/> <xs:element name="subsonic-response" type="sub:Response"/>
@ -52,6 +52,7 @@
</xs:choice> </xs:choice>
<xs:attribute name="status" type="sub:ResponseStatus" use="required"/> <xs:attribute name="status" type="sub:ResponseStatus" use="required"/>
<xs:attribute name="version" type="sub:Version" use="required"/> <xs:attribute name="version" type="sub:Version" use="required"/>
<xs:attribute name="type" type="xs:string" use="required" />
</xs:complexType> </xs:complexType>
<xs:simpleType name="ResponseStatus"> <xs:simpleType name="ResponseStatus">

Loading…
Cancel
Save