mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
fix various errors, add missing functions
This commit is contained in:
parent
6f4ec80ad6
commit
fa56d5735d
|
@ -13,6 +13,9 @@ info:
|
|||
license:
|
||||
name: "Apache 2.0"
|
||||
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
servers:
|
||||
- url:
|
||||
description: Current host server
|
||||
host: "<?php echo $_SERVER['HTTP_HOST']; ?>"
|
||||
basePath: "<?php echo $settings->_httpRoot; ?>restapi/index.php"
|
||||
tags:
|
||||
|
@ -22,6 +25,7 @@ tags:
|
|||
description: "Find out more about our store"
|
||||
url: "https://www.seeddms.org"
|
||||
schemes:
|
||||
- "http"
|
||||
- "https"
|
||||
paths:
|
||||
/login:
|
||||
|
@ -32,9 +36,9 @@ paths:
|
|||
description: "Log in by providing a username and password"
|
||||
operationId: "login"
|
||||
produces:
|
||||
- "application/json"
|
||||
- "application/json"
|
||||
consumes:
|
||||
- application/x-www-form-urlencoded
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "user"
|
||||
in: "formData"
|
||||
|
@ -111,7 +115,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- application/x-www-form-urlencoded
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- in: formData
|
||||
name: email
|
||||
|
@ -138,7 +142,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- in: formData
|
||||
name: email
|
||||
|
@ -208,7 +212,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- in: "formData"
|
||||
name: "user"
|
||||
|
@ -371,7 +375,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -431,7 +435,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- in: "formData"
|
||||
name: "name"
|
||||
|
@ -687,11 +691,106 @@ paths:
|
|||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/document/{id}/version/{version}/attributes:
|
||||
get:
|
||||
tags:
|
||||
- "document"
|
||||
summary: "Return attributes of document version"
|
||||
description: "Returns the attributes of a given document version"
|
||||
operationId: "getDocumentContentAttributes"
|
||||
produces:
|
||||
- "application/json"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
description: "ID of document whose attributes to be returned."
|
||||
type: "integer"
|
||||
required: true
|
||||
format: "int64"
|
||||
- name: "version"
|
||||
in: "path"
|
||||
description: "Version number of document"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
responses:
|
||||
"200":
|
||||
description: "successful operation"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponseAttributes"
|
||||
"403":
|
||||
description: "No access"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"404":
|
||||
description: "Document or version not found"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"500":
|
||||
description: "Internal error"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/document/{id}/version/{version}/attribute/{attrdefid}:
|
||||
put:
|
||||
tags:
|
||||
- "document"
|
||||
summary: "Set document version attribute"
|
||||
description: "Sets the attribute value of a document version. If the value is an empty string the attribute will be deleted."
|
||||
operationId: "setDocumentContentAttribute"
|
||||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
description: "ID of document"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
- name: "version"
|
||||
in: "path"
|
||||
description: "Version number of document"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
- name: "attrdefid"
|
||||
in: "path"
|
||||
description: "ID of attribute definition"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
- in: "formData"
|
||||
name: "value"
|
||||
type: "string"
|
||||
description: "Value of attribute"
|
||||
required: true
|
||||
responses:
|
||||
"201":
|
||||
description: "successful operation"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"400":
|
||||
description: "Invalid attribute value, or setting an attribute not allowed for the type of object"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"403":
|
||||
description: "No access"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"404":
|
||||
description: "Document, version or attribute definition not found"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/document/{id}/attributes:
|
||||
get:
|
||||
tags:
|
||||
- "document"
|
||||
summary: "Return attributes of document by ID"
|
||||
summary: "Return attributes of document"
|
||||
description: "Returns the attributes of a given document"
|
||||
operationId: "getDocumentAttributes"
|
||||
produces:
|
||||
|
@ -722,11 +821,59 @@ paths:
|
|||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/document/{id}/attribute/{attrdefid}:
|
||||
put:
|
||||
tags:
|
||||
- "document"
|
||||
summary: "Set document attribute"
|
||||
description: "Sets the attribute value of a document. If the value is an empty string the attribute will be deleted."
|
||||
operationId: "setDocumentAttribute"
|
||||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
description: "ID of document"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
- name: "attrdefid"
|
||||
in: "path"
|
||||
description: "ID of attribute definition"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
- in: "formData"
|
||||
name: "value"
|
||||
type: "string"
|
||||
description: "Value of attribute"
|
||||
required: true
|
||||
responses:
|
||||
"201":
|
||||
description: "successful operation"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"400":
|
||||
description: "Invalid attribute value, or setting an attribute not allowed for the type of object"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"403":
|
||||
description: "No access"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"404":
|
||||
description: "Document or attribute definition not found"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/document/{id}/files:
|
||||
get:
|
||||
tags:
|
||||
- "document"
|
||||
summary: "Return attached files of document by ID"
|
||||
summary: "Return attached files of document"
|
||||
description: "Returns the attached files of a given document"
|
||||
operationId: "getDocumentFiles"
|
||||
produces:
|
||||
|
@ -802,7 +949,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -920,7 +1067,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -957,7 +1104,6 @@ paths:
|
|||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/document/{id}/category/{catid}:
|
||||
delete:
|
||||
tags:
|
||||
- "document"
|
||||
|
@ -1008,7 +1154,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -1223,7 +1369,7 @@ paths:
|
|||
get:
|
||||
tags:
|
||||
- "folder"
|
||||
summary: "Return attributes of folder by ID"
|
||||
summary: "Return attributes of folder"
|
||||
description: "Returns the attributes of a given folder"
|
||||
operationId: "getFolderAttributes"
|
||||
produces:
|
||||
|
@ -1254,6 +1400,54 @@ paths:
|
|||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/folder/{id}/attribute/{attrdefid}:
|
||||
put:
|
||||
tags:
|
||||
- "folder"
|
||||
summary: "Set folder attribute"
|
||||
description: "Sets the attribute value of a folder. If the value is an empty string the attribute will be deleted."
|
||||
operationId: "setFolderAttribute"
|
||||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
description: "ID of folder"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
- name: "attrdefid"
|
||||
in: "path"
|
||||
description: "ID of attribute definition"
|
||||
required: true
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
- in: "formData"
|
||||
name: "value"
|
||||
type: "string"
|
||||
description: "Value of attribute"
|
||||
required: true
|
||||
responses:
|
||||
"201":
|
||||
description: "successful operation"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"400":
|
||||
description: "Invalid attribute value, or setting an attribute not allowed for the type of object"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"403":
|
||||
description: "No access"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"404":
|
||||
description: "Folder or attribute definition not found"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/folder/{id}/folder:
|
||||
post:
|
||||
tags:
|
||||
|
@ -1264,7 +1458,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -1316,7 +1510,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -1390,7 +1584,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- in: "formData"
|
||||
name: "name"
|
||||
|
@ -1487,7 +1681,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -1543,7 +1737,7 @@ paths:
|
|||
produces:
|
||||
- "application/json"
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
- "application/x-www-form-urlencoded"
|
||||
parameters:
|
||||
- name: "id"
|
||||
in: "path"
|
||||
|
@ -1570,10 +1764,28 @@ paths:
|
|||
$ref: "#/definitions/ApiResponse"
|
||||
security:
|
||||
- api_key: []
|
||||
/statstotal:
|
||||
get:
|
||||
tags:
|
||||
- "misc"
|
||||
summary: "Return various statistical data"
|
||||
description: "Just returns the body content"
|
||||
operationId: "getStatsTotal"
|
||||
produces:
|
||||
- "application/json"
|
||||
responses:
|
||||
"200":
|
||||
description: "successful operation"
|
||||
schema:
|
||||
$ref: "#/definitions/ApiResponse"
|
||||
"400":
|
||||
description: "Invalid status value"
|
||||
security:
|
||||
- api_key: []
|
||||
/echo:
|
||||
get:
|
||||
tags:
|
||||
- "test"
|
||||
- "misc"
|
||||
summary: "Return what was send in the body"
|
||||
description: "Just returns the body content"
|
||||
operationId: "echoData"
|
||||
|
|
Loading…
Reference in New Issue
Block a user