Created
November 15, 2016 14:01
-
-
Save sercand/78597b67dec3db66040b4a720c003cf6 to your computer and use it in GitHub Desktop.
service.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "service.proto", | |
"version": "version not set" | |
}, | |
"schemes": [ | |
"http", | |
"https" | |
], | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"paths": { | |
"/api/v1/asset/app": { | |
"post": { | |
"operationId": "UpdateApp", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoApp" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
}, | |
"put": { | |
"operationId": "PutApp", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoIDResponse" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoApp" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/app/{id}": { | |
"get": { | |
"operationId": "GetApp", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoApp" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/app/{id}/disable": { | |
"post": { | |
"operationId": "DisableApp", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/app/{id}/enable": { | |
"post": { | |
"operationId": "EnableApp", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec": { | |
"post": { | |
"operationId": "UpdateAppSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoAppSpec" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
}, | |
"put": { | |
"operationId": "PutAppSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoIDResponse" | |
} | |
} | |
}, | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/addComponentSpec": { | |
"put": { | |
"operationId": "AddComponentSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoComponentSpecRequest" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/list": { | |
"post": { | |
"operationId": "ListAppSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoAppSpecList" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoQueryAppSpec" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/listComponentSpec": { | |
"put": { | |
"operationId": "ListComponentSpecs", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoComponentSpecList" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoQueryComponentSpec" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/removeComponentSpec": { | |
"put": { | |
"operationId": "RemoveComponentSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoRemoveComponentSpecRequest" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/updateComponentSpec": { | |
"put": { | |
"operationId": "UpdateComponentSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoComponentSpecRequest" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/{id}": { | |
"get": { | |
"operationId": "GetAppSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoAppSpec" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/{id}/disable": { | |
"post": { | |
"operationId": "DisableAppSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/appspec/{id}/enable": { | |
"post": { | |
"operationId": "EnableAppSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/component": { | |
"post": { | |
"operationId": "UpdateComponent", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoComponent" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
}, | |
"put": { | |
"operationId": "AddComponent", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoIDResponse" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoAddComponentRequest" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/component/{id}": { | |
"get": { | |
"operationId": "GetComponent", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoComponent" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/component/{id}/disable": { | |
"post": { | |
"operationId": "DisableComponent", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/component/{id}/enable": { | |
"post": { | |
"operationId": "EnableComponent", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material": { | |
"post": { | |
"operationId": "UpdateMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoMaterial" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
}, | |
"put": { | |
"operationId": "PutMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoIDResponse" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoMaterial" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/list": { | |
"post": { | |
"operationId": "ListMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoMaterialList" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoQueryMaterial" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/listBySpec": { | |
"post": { | |
"operationId": "ListByMaterialSpec", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoMaterialsWithLocales" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoMaterialSpec" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/{id}": { | |
"get": { | |
"operationId": "GetMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoMaterial" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/{id}/components": { | |
"get": { | |
"operationId": "GetComponentsOfMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoComponentList" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/{id}/disable": { | |
"post": { | |
"operationId": "DisableMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/{id}/enable": { | |
"post": { | |
"operationId": "EnableMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/{material_id}/component/{id}": { | |
"get": { | |
"operationId": "GetComponentOfMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoComponent" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "material_id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/{material_id}/component/{id}/disable": { | |
"post": { | |
"operationId": "DisableComponentOfMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "material_id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoComponentIDRequest" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/asset/material/{material_id}/component/{id}/enable": { | |
"post": { | |
"operationId": "EnableComponentOfMaterial", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "material_id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/otsimoComponentIDRequest" | |
} | |
} | |
], | |
"tags": [ | |
"Asset" | |
] | |
} | |
}, | |
"/api/v1/builder/compile/{id}": { | |
"post": { | |
"summary": "Compile the Application", | |
"operationId": "CompileApp", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoEmpty" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Builder" | |
] | |
} | |
}, | |
"/api/v1/builder/preview/{id}": { | |
"post": { | |
"operationId": "PreviewApp", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/otsimoPreviewAppResponse" | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "string" | |
} | |
], | |
"tags": [ | |
"Builder" | |
] | |
} | |
} | |
}, | |
"definitions": { | |
"ComponentSpecParent": { | |
"type": "string", | |
"enum": [ | |
"APP", | |
"MATERIAL" | |
], | |
"default": "APP" | |
}, | |
"ComponentValue": { | |
"type": "object", | |
"properties": { | |
"metadata": { | |
"$ref": "#/definitions/otsimoAppMetadata" | |
}, | |
"number": { | |
"type": "number", | |
"format": "double" | |
}, | |
"steps": { | |
"$ref": "#/definitions/otsimoDrawSteps" | |
}, | |
"str": { | |
"type": "string", | |
"format": "string" | |
}, | |
"url": { | |
"type": "string", | |
"format": "string" | |
}, | |
"vector": { | |
"$ref": "#/definitions/otsimoVectorArray" | |
} | |
} | |
}, | |
"QueryComponentSpecFilterParent": { | |
"type": "string", | |
"enum": [ | |
"ALL", | |
"ONLY_APP", | |
"ONLY_MATERIAL" | |
], | |
"default": "ALL" | |
}, | |
"otsimoAccessMode": { | |
"type": "string", | |
"enum": [ | |
"PUBLIC", | |
"OWNER" | |
], | |
"default": "PUBLIC", | |
"title": "TODO: improve Access Mode" | |
}, | |
"otsimoAddComponentRequest": { | |
"type": "object", | |
"properties": { | |
"component": { | |
"$ref": "#/definitions/otsimoComponent" | |
}, | |
"material_id": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
}, | |
"otsimoApp": { | |
"type": "object", | |
"properties": { | |
"created_at": { | |
"type": "string", | |
"format": "int64" | |
}, | |
"created_by": { | |
"type": "string", | |
"format": "string", | |
"title": "CreatedBy is the owner of this material" | |
}, | |
"data": { | |
"$ref": "#/definitions/otsimoAppData" | |
}, | |
"disabled": { | |
"type": "boolean", | |
"format": "boolean" | |
}, | |
"env": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "Env is appends to AppSpec.env" | |
}, | |
"id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"name": { | |
"type": "string", | |
"format": "string" | |
}, | |
"spec": { | |
"type": "string", | |
"format": "string" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "int64" | |
} | |
}, | |
"title": "App is an app like 'Color Match Game' based on 'Match Game Spec'" | |
}, | |
"otsimoAppData": { | |
"type": "object", | |
"properties": { | |
"components": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoComponent" | |
} | |
}, | |
"material_ids": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
} | |
}, | |
"otsimoAppMetadata": { | |
"type": "object", | |
"properties": { | |
"description": { | |
"type": "string", | |
"format": "string", | |
"title": "Description" | |
}, | |
"icon": { | |
"type": "string", | |
"format": "string", | |
"title": "Icon is a square image" | |
}, | |
"images": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "Images are image files" | |
}, | |
"info_slug": { | |
"type": "string", | |
"format": "string", | |
"title": "InfoSlug is the id of the content which describes how to play this game" | |
}, | |
"keywords": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "Keywords" | |
}, | |
"logo": { | |
"type": "string", | |
"format": "string", | |
"title": "Logo is a rectangle image" | |
}, | |
"summary": { | |
"type": "string", | |
"format": "string", | |
"title": "Summary is summary of game" | |
}, | |
"visible_name": { | |
"type": "string", | |
"format": "string", | |
"title": "Visible Name" | |
} | |
} | |
}, | |
"otsimoAppSpec": { | |
"type": "object", | |
"properties": { | |
"command": { | |
"type": "string", | |
"format": "string", | |
"title": "Command is a bash script will compile the app, will run with \"sh -c command\"" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoComponentSpec" | |
} | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "int64" | |
}, | |
"created_by": { | |
"type": "string", | |
"format": "string", | |
"title": "CreatedBy is the owner of this AppSpec" | |
}, | |
"disabled": { | |
"type": "boolean", | |
"format": "boolean" | |
}, | |
"env": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "Env is runtime env of command script" | |
}, | |
"id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"material_label_selector": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "LabelSelector is basic query to filter materials" | |
}, | |
"name": { | |
"type": "string", | |
"format": "string" | |
}, | |
"repository": { | |
"type": "string", | |
"format": "string" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "int64" | |
} | |
}, | |
"title": "AppSpec is defines an app like Match Game, Choose Game or Drawing Game" | |
}, | |
"otsimoAppSpecList": { | |
"type": "object", | |
"properties": { | |
"specs": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoAppSpec" | |
} | |
} | |
} | |
}, | |
"otsimoComponent": { | |
"type": "object", | |
"properties": { | |
"access_mode": { | |
"$ref": "#/definitions/otsimoAccessMode", | |
"description": "TODO: AccessMode is determines whether is public or not." | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "int64" | |
}, | |
"created_by": { | |
"type": "string", | |
"format": "string", | |
"title": "CreatedBy is the owner of this component. If a material is public than users can\nadd private component for themself" | |
}, | |
"description": { | |
"type": "string", | |
"format": "string", | |
"description": "Description of this component." | |
}, | |
"disabled": { | |
"type": "boolean", | |
"format": "boolean", | |
"title": "Is this component disabled" | |
}, | |
"id": { | |
"type": "string", | |
"format": "string", | |
"title": "ID is auto generated component uuid" | |
}, | |
"key": { | |
"type": "string", | |
"format": "string", | |
"description": "Key is the key for material, like 'letter_audio' for drawing game.\nThis field is not unique, there could be more than one component with same key.\nIf there is more than one key than game will choose one of them randomly." | |
}, | |
"labels": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "Labels for querying components" | |
}, | |
"locales": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "Locales are the locales that supports this component, like 'en','tr' or country\nspesific 'en-GB' 'en-US'. If this is empty which means supports all locales" | |
}, | |
"type": { | |
"$ref": "#/definitions/otsimoComponentType", | |
"title": "Type is component type" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "int64" | |
}, | |
"value": { | |
"$ref": "#/definitions/ComponentValue", | |
"title": "component value" | |
}, | |
"version": { | |
"type": "string", | |
"format": "int64", | |
"title": "Version is component version that will increase on each update" | |
} | |
} | |
}, | |
"otsimoComponentIDRequest": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"material_id": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
}, | |
"otsimoComponentList": { | |
"type": "object", | |
"properties": { | |
"components": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoComponent" | |
} | |
} | |
} | |
}, | |
"otsimoComponentSpec": { | |
"type": "object", | |
"properties": { | |
"is_advanced": { | |
"type": "boolean", | |
"format": "boolean", | |
"title": "IsAdvanced is boolean for whether this component is advanced or not" | |
}, | |
"key": { | |
"type": "string", | |
"format": "string", | |
"title": "Key is the required component key and it is unique for material spec" | |
}, | |
"label_selector": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "LabelSelector is basic query" | |
}, | |
"parent": { | |
"$ref": "#/definitions/ComponentSpecParent", | |
"title": "Parent is the owner of this component spec" | |
}, | |
"type": { | |
"$ref": "#/definitions/otsimoComponentType", | |
"title": "Type is required component type" | |
} | |
} | |
}, | |
"otsimoComponentSpecList": { | |
"type": "object", | |
"properties": { | |
"app_spec_id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"specs": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoComponentSpec" | |
} | |
} | |
} | |
}, | |
"otsimoComponentSpecRequest": { | |
"type": "object", | |
"properties": { | |
"app_spec_id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"component_spec": { | |
"$ref": "#/definitions/otsimoComponentSpec" | |
} | |
} | |
}, | |
"otsimoComponentType": { | |
"type": "string", | |
"enum": [ | |
"TEXT", | |
"IMAGE", | |
"AUDIO", | |
"COLOR", | |
"NUMBER", | |
"VIDEO", | |
"FILE", | |
"VECTOR_ARRAY", | |
"DRAW_STEPS", | |
"METADATA" | |
], | |
"default": "TEXT", | |
"title": "ComponentType is enumeration for component type like image, audio" | |
}, | |
"otsimoDrawSteps": { | |
"type": "object", | |
"properties": { | |
"steps": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoVectorArray" | |
} | |
} | |
} | |
}, | |
"otsimoEmpty": { | |
"type": "object" | |
}, | |
"otsimoIDRequest": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
}, | |
"otsimoIDResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
}, | |
"otsimoLocaleList": { | |
"type": "object", | |
"properties": { | |
"locales": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
} | |
}, | |
"otsimoMaterial": { | |
"type": "object", | |
"properties": { | |
"access_mode": { | |
"$ref": "#/definitions/otsimoAccessMode", | |
"title": "AccessMode is the access mode of this material. Users can add materials for themself as private or public.\nIf it is than anyone can add new components. ??What happens if a public material goes to private or disabled.\n?? Other component owners situations in that case" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoComponent" | |
}, | |
"title": "List of components of this material" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "int64" | |
}, | |
"created_by": { | |
"type": "string", | |
"format": "string", | |
"title": "CreatedBy is the owner of this material" | |
}, | |
"description": { | |
"type": "string", | |
"format": "string", | |
"title": "Description is explains what is this material and what for" | |
}, | |
"disabled": { | |
"type": "boolean", | |
"format": "boolean" | |
}, | |
"id": { | |
"type": "string", | |
"format": "string", | |
"title": "ID of the material" | |
}, | |
"labels": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string", | |
"format": "string" | |
}, | |
"title": "Labels of the material for querying" | |
}, | |
"name": { | |
"type": "string", | |
"format": "string", | |
"title": "Name of the material" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "int64" | |
}, | |
"version": { | |
"type": "string", | |
"format": "int64", | |
"title": "TODO: Version is material version that will increase on each update" | |
} | |
} | |
}, | |
"otsimoMaterialList": { | |
"type": "object", | |
"properties": { | |
"ids": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
} | |
}, | |
"otsimoMaterialSpec": { | |
"type": "object", | |
"properties": { | |
"component_specs": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoComponentSpec" | |
} | |
}, | |
"label_selector": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
} | |
}, | |
"otsimoMaterialsWithLocales": { | |
"type": "object", | |
"properties": { | |
"materials": { | |
"type": "object", | |
"additionalProperties": { | |
"$ref": "#/definitions/otsimoLocaleList" | |
} | |
} | |
} | |
}, | |
"otsimoPoint": { | |
"type": "object", | |
"properties": { | |
"x": { | |
"type": "number", | |
"format": "double" | |
}, | |
"y": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"title": "Point is a 2D vector" | |
}, | |
"otsimoPreviewAppResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"url": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
}, | |
"otsimoQueryAppSpec": { | |
"type": "object", | |
"properties": { | |
"only_mine": { | |
"type": "boolean", | |
"format": "boolean" | |
}, | |
"show_disabled": { | |
"type": "boolean", | |
"format": "boolean" | |
} | |
} | |
}, | |
"otsimoQueryComponentSpec": { | |
"type": "object", | |
"properties": { | |
"app_spec_id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"parent": { | |
"$ref": "#/definitions/QueryComponentSpecFilterParent" | |
} | |
} | |
}, | |
"otsimoQueryMaterial": { | |
"type": "object", | |
"properties": { | |
"label_selector": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string", | |
"format": "string" | |
} | |
}, | |
"only_mine": { | |
"type": "boolean", | |
"format": "boolean" | |
}, | |
"show_disabled": { | |
"type": "boolean", | |
"format": "boolean" | |
} | |
} | |
}, | |
"otsimoRemoveComponentSpecRequest": { | |
"type": "object", | |
"properties": { | |
"app_spec_id": { | |
"type": "string", | |
"format": "string" | |
}, | |
"component_spec_key": { | |
"type": "string", | |
"format": "string" | |
} | |
} | |
}, | |
"otsimoVectorArray": { | |
"type": "object", | |
"properties": { | |
"points": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/otsimoPoint" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment