| POST | /document/create |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Tạo văn bản
*/
public static class CreateDocumentRequest
{
public String title = null;
public String documentCode = null;
public String description = null;
public Integer documentPolicyId = null;
public Integer mainId = null;
public Integer scopeType = null;
public String getTitle() { return title; }
public CreateDocumentRequest setTitle(String value) { this.title = value; return this; }
public String getDocumentCode() { return documentCode; }
public CreateDocumentRequest setDocumentCode(String value) { this.documentCode = value; return this; }
public String getDescription() { return description; }
public CreateDocumentRequest setDescription(String value) { this.description = value; return this; }
public Integer getDocumentPolicyId() { return documentPolicyId; }
public CreateDocumentRequest setDocumentPolicyId(Integer value) { this.documentPolicyId = value; return this; }
public Integer getMainId() { return mainId; }
public CreateDocumentRequest setMainId(Integer value) { this.mainId = value; return this; }
public Integer getScopeType() { return scopeType; }
public CreateDocumentRequest setScopeType(Integer value) { this.scopeType = value; return this; }
}
public static class CreateDocumentResponse implements IResponseRequest
{
public Long id = null;
public Integer code = null;
public String message = null;
public Long getId() { return id; }
public CreateDocumentResponse setId(Long value) { this.id = value; return this; }
public Integer getCode() { return code; }
public CreateDocumentResponse setCode(Integer value) { this.code = value; return this; }
public String getMessage() { return message; }
public CreateDocumentResponse setMessage(String value) { this.message = value; return this; }
}
}
Java CreateDocumentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /document/create HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
title: String,
documentCode: String,
description: String,
documentPolicyId: 0,
mainId: 0,
scopeType: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: 0,
code: 0,
message: String
}