Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
217 lines (216 sloc) 6.15 KB
{
"basePath" : "/api",
"produces" : [
"application/json",
"text/plain",
"text/html"
],
"schemes" : [
"http",
"https"
],
"definitions" : {
"Errors" : {
"items" : {
"$ref" : "#/definitions/Error"
},
"type" : "array"
},
"ErrorResponse" : {
"properties" : {
"errors:" : {
"$ref" : "#/definitions/Errors"
},
"valid" : {
"type" : "boolean"
}
},
"type" : "object"
},
"Error" : {
"required" : [
"message"
],
"properties" : {
"path" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
},
"StraniciItem" : {
"properties" : {
"page_type" : {
"maxLength" : "32",
"type" : "string"
},
"pid" : {
"type" : "integer"
},
"alias" : {
"type" : "string",
"maxLength" : "32"
},
"sorting" : {
"type" : "integer"
},
"id" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"is_dir" : {
"type" : "boolean"
}
},
"required" : [
"id",
"alias",
"page_type"
],
"description" : "An object, representing one item of Stranici."
},
"Stranici" : {
"items" : {
"$ref" : "#/definitions/StraniciItem"
},
"type" : "array"
}
},
"swagger" : "2.0",
"parameters" : {
"offset" : {
"minimum" : 0,
"name" : "offset",
"in" : "query",
"description" : "At what offset (min: 0)?",
"type" : "integer",
"default" : 0
},
"limit" : {
"description" : "How many, items to return at once (max: 100; min: 1)",
"type" : "integer",
"maximum" : 100,
"name" : "limit",
"in" : "query",
"default" : 100,
"minimum" : 1
},
"lang": {
"name": "ѩꙁыкъ",
"description": "In what language the title will be shown or content will be?",
"type": "string",
"in": "query",
"default": "bg-bg",
"pattern": "^[A-z]{2}(?:-[A-z]{2})?$"
},
"language": {
"name": "language",
"description": "Range of possible values for celini and page forms?",
"type": "string",
"in": "formData",
"required": true,
"default": "bg-bg",
"enum":[
"bg", "bg-bg", "bg-mk", "en", "en-us",
"cu-ru", "cu-bg", "cz", "sk", "ru", "pl",
"sr", "sr-Cyrl","sr-Latn","fr", "de"]
},
"data_format": {
"name": "data_format",
"description": "Range of possible values for celini data formats?",
"type": "string",
"in": "formData",
"required": true,
"default": "html",
"enum":["html", "text", "markdown", "asc"]
},
"data_type": {
"name": "data_type",
"description": "Range of possible values for celini data types?",
"type": "string",
"in": "formData",
"required": false,
"default": "html",
"enum":["заглавѥ", "белѣжка", "писанѥ", "книга", "въпросъ", "ѿговоръ", "цѣлина"]
},
"permissions":{
"name":"permissions",
"description": "Range of possible values for celini data formats?",
"type": "string",
"in": "formData",
"required": false,
"default": "-rwxr-xr-x",
"enum":["drwxr-xr-x", "drwxrwxr-x", "-rwxr-xr-x", "-rwxrwxr-x",
"lrwxr-xr-x", "-rwxr--r-x", "-rwx------", "drwx------","-r-x------", "dr-x------"]
}
},
"consumes" : [
"application/json",
"multipart/form-data",
"application/x-www-form-urlencoded"
],
"paths" : {
"/страници" : {
"get" : {
"parameters" : [
{
"$ref" : "#/parameters/limit"
},
{
"$ref" : "#/parameters/offset"
},
{
"$ref" : "#/parameters/lang"
},
{
"name": "pid",
"type": "integer",
"in": "query",
"description": "Filter by this value of column 'pid'(parent id)"
},
{
"name": "columns",
"type":"array",
"in":"query",
"collectionFormat": "csv",
"default": ["id", "pid", "alias", "page_type", "sorting", "title", "is_dir", "language"],
"items": {"type":"string",
"enum":["id", "pid", "alias", "page_type", "sorting", "title", "is_dir", "language"]},
"description": "Which properties of the object to be returned only?"
}
],
"x-mojo-to" : "stranici#list",
"operationId" : "api.list_stranici",
"summary" : "List all records of type Stranici.",
"description" : "List all records of type Stranici according to the client's priviledges.",
"responses" : {
"200" : {
"schema" : {
"$ref" : "#/definitions/Stranici"
},
"description" : "An array of Stranici."
},
"default" : {
"$ref" : "#/definitions/ErrorResponse"
}
}
}
}
},
"info" : {
"title" : "Slovo OpenAPI",
"license" : {
"name" : "Artistic License 2.0"
},
"version" : "1.0",
"contact" : {
"name" : "Company name here",
"email" : "company_api@example.com"
},
"description" : "This is the OpenAPI specification for Slovo OpenAPI."
}
}