more api documentation

This commit is contained in:
Athou
2013-04-17 13:26:14 +02:00
parent ef3508f393
commit 4c927630a7
8 changed files with 87 additions and 21 deletions

View File

@@ -4,11 +4,18 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Profile modification request")
public class ProfileModificationRequest {
@ApiProperty(value = "changes email of the user, if specified")
private String email;
@ApiProperty(value = "changes password of the user, if specified")
private String password;
public String getEmail() {

View File

@@ -6,16 +6,31 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("User information")
public class Subscription implements Serializable {
@ApiProperty(value = "subscription id", required = true)
private Long id;
@ApiProperty(value = "subscription name", required = true)
private String name;
@ApiProperty(value = "error message while fetching the feed", required = true)
private String message;
@ApiProperty(value = "error count", required = true)
private int errorCount;
@ApiProperty(value = "this subscription's feed url", required = true)
private String feedUrl;
@ApiProperty(value = "unread count", required = true)
private long unread;
public Long getId() {

View File

@@ -6,16 +6,31 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("User information")
public class UserModel implements Serializable {
@ApiProperty(value = "user id", required = true)
private Long id;
@ApiProperty(value = "user name", required = true)
private String name;
@ApiProperty("user email, if any")
private String email;
@ApiProperty(value = "user password, never returned by the api")
private String password;
@ApiProperty(value = "account status")
private boolean enabled;
@ApiProperty(value = "user is admin")
private boolean admin;
public Long getId() {