Files
opencloud/settings/pkg/proto/v0/settings.swagger.json
Jörn Friedrich Dreyer 63416c3cac update proto-gen-micro, regenerate protobuf, mod tidy all
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-02-18 08:03:22 +00:00

1118 lines
26 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "ownCloud Infinite Scale settings",
"version": "1.0.0",
"contact": {
"name": "ownCloud GmbH",
"url": "https://github.com/owncloud/ocis",
"email": "support@owncloud.com"
},
"license": {
"name": "Apache-2.0",
"url": "https://github.com/owncloud/ocis/blob/master/LICENSE"
}
},
"tags": [
{
"name": "BundleService"
},
{
"name": "ValueService"
},
{
"name": "RoleService"
},
{
"name": "PermissionService"
}
],
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/api/v0/settings/assignments-add": {
"post": {
"operationId": "RoleService_AssignRoleToUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoAssignRoleToUserResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoAssignRoleToUserRequest"
}
}
],
"tags": [
"RoleService"
]
}
},
"/api/v0/settings/assignments-list": {
"post": {
"operationId": "RoleService_ListRoleAssignments",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoListRoleAssignmentsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoListRoleAssignmentsRequest"
}
}
],
"tags": [
"RoleService"
]
}
},
"/api/v0/settings/assignments-remove": {
"post": {
"operationId": "RoleService_RemoveRoleFromUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoRemoveRoleFromUserRequest"
}
}
],
"tags": [
"RoleService"
]
}
},
"/api/v0/settings/bundle-get": {
"post": {
"operationId": "BundleService_GetBundle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoGetBundleResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoGetBundleRequest"
}
}
],
"tags": [
"BundleService"
]
}
},
"/api/v0/settings/bundle-save": {
"post": {
"operationId": "BundleService_SaveBundle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoSaveBundleResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoSaveBundleRequest"
}
}
],
"tags": [
"BundleService"
]
}
},
"/api/v0/settings/bundles-add-setting": {
"post": {
"operationId": "BundleService_AddSettingToBundle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoAddSettingToBundleResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoAddSettingToBundleRequest"
}
}
],
"tags": [
"BundleService"
]
}
},
"/api/v0/settings/bundles-list": {
"post": {
"operationId": "BundleService_ListBundles",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoListBundlesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoListBundlesRequest"
}
}
],
"tags": [
"BundleService"
]
}
},
"/api/v0/settings/bundles-remove-setting": {
"post": {
"operationId": "BundleService_RemoveSettingFromBundle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoRemoveSettingFromBundleRequest"
}
}
],
"tags": [
"BundleService"
]
}
},
"/api/v0/settings/permissions-get-by-id": {
"post": {
"operationId": "PermissionService_GetPermissionByID",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoGetPermissionByIDResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoGetPermissionByIDRequest"
}
}
],
"tags": [
"PermissionService"
]
}
},
"/api/v0/settings/permissions-list-by-resource": {
"post": {
"operationId": "PermissionService_ListPermissionsByResource",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoListPermissionsByResourceResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoListPermissionsByResourceRequest"
}
}
],
"tags": [
"PermissionService"
]
}
},
"/api/v0/settings/roles-list": {
"post": {
"operationId": "RoleService_ListRoles",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoListBundlesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoListBundlesRequest"
}
}
],
"tags": [
"RoleService"
]
}
},
"/api/v0/settings/values-get": {
"post": {
"operationId": "ValueService_GetValue",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoGetValueResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoGetValueRequest"
}
}
],
"tags": [
"ValueService"
]
}
},
"/api/v0/settings/values-get-by-unique-identifiers": {
"post": {
"operationId": "ValueService_GetValueByUniqueIdentifiers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoGetValueResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoGetValueByUniqueIdentifiersRequest"
}
}
],
"tags": [
"ValueService"
]
}
},
"/api/v0/settings/values-list": {
"post": {
"operationId": "ValueService_ListValues",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoListValuesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoListValuesRequest"
}
}
],
"tags": [
"ValueService"
]
}
},
"/api/v0/settings/values-save": {
"post": {
"operationId": "ValueService_SaveValue",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoSaveValueResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoSaveValueRequest"
}
}
],
"tags": [
"ValueService"
]
}
}
},
"definitions": {
"PermissionConstraint": {
"type": "string",
"enum": [
"CONSTRAINT_UNKNOWN",
"CONSTRAINT_OWN",
"CONSTRAINT_SHARED",
"CONSTRAINT_ALL"
],
"default": "CONSTRAINT_UNKNOWN"
},
"protoAddSettingToBundleRequest": {
"type": "object",
"properties": {
"bundleId": {
"type": "string"
},
"setting": {
"$ref": "#/definitions/protoSetting"
}
}
},
"protoAddSettingToBundleResponse": {
"type": "object",
"properties": {
"setting": {
"$ref": "#/definitions/protoSetting"
}
}
},
"protoAssignRoleToUserRequest": {
"type": "object",
"properties": {
"accountUuid": {
"type": "string"
},
"roleId": {
"type": "string",
"title": "the role_id is a bundle_id internally"
}
}
},
"protoAssignRoleToUserResponse": {
"type": "object",
"properties": {
"assignment": {
"$ref": "#/definitions/protoUserRoleAssignment"
}
}
},
"protoBool": {
"type": "object",
"properties": {
"default": {
"type": "boolean"
},
"label": {
"type": "string"
}
}
},
"protoBundle": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/protoBundleType"
},
"extension": {
"type": "string"
},
"displayName": {
"type": "string"
},
"settings": {
"type": "array",
"items": {
"$ref": "#/definitions/protoSetting"
}
},
"resource": {
"$ref": "#/definitions/protoResource"
}
}
},
"protoBundleType": {
"type": "string",
"enum": [
"TYPE_UNKNOWN",
"TYPE_DEFAULT",
"TYPE_ROLE"
],
"default": "TYPE_UNKNOWN"
},
"protoGetBundleRequest": {
"type": "object",
"properties": {
"bundleId": {
"type": "string"
}
}
},
"protoGetBundleResponse": {
"type": "object",
"properties": {
"bundle": {
"$ref": "#/definitions/protoBundle"
}
}
},
"protoGetPermissionByIDRequest": {
"type": "object",
"properties": {
"permissionId": {
"type": "string"
}
}
},
"protoGetPermissionByIDResponse": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/protoPermission"
}
}
},
"protoGetValueByUniqueIdentifiersRequest": {
"type": "object",
"properties": {
"accountUuid": {
"type": "string"
},
"settingId": {
"type": "string"
}
}
},
"protoGetValueRequest": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"protoGetValueResponse": {
"type": "object",
"properties": {
"value": {
"$ref": "#/definitions/protoValueWithIdentifier"
}
}
},
"protoIdentifier": {
"type": "object",
"properties": {
"extension": {
"type": "string"
},
"bundle": {
"type": "string"
},
"setting": {
"type": "string"
}
}
},
"protoInt": {
"type": "object",
"properties": {
"default": {
"type": "string",
"format": "int64"
},
"min": {
"type": "string",
"format": "int64"
},
"max": {
"type": "string",
"format": "int64"
},
"step": {
"type": "string",
"format": "int64"
},
"placeholder": {
"type": "string"
}
}
},
"protoListBundlesRequest": {
"type": "object",
"properties": {
"bundleIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"protoListBundlesResponse": {
"type": "object",
"properties": {
"bundles": {
"type": "array",
"items": {
"$ref": "#/definitions/protoBundle"
}
}
}
},
"protoListOption": {
"type": "object",
"properties": {
"value": {
"$ref": "#/definitions/protoListOptionValue"
},
"default": {
"type": "boolean"
},
"displayValue": {
"type": "string"
}
}
},
"protoListOptionValue": {
"type": "object",
"properties": {
"stringValue": {
"type": "string"
},
"intValue": {
"type": "string",
"format": "int64"
}
}
},
"protoListPermissionsByResourceRequest": {
"type": "object",
"properties": {
"resource": {
"$ref": "#/definitions/protoResource"
}
}
},
"protoListPermissionsByResourceResponse": {
"type": "object",
"properties": {
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/protoPermission"
}
}
}
},
"protoListRoleAssignmentsRequest": {
"type": "object",
"properties": {
"accountUuid": {
"type": "string"
}
}
},
"protoListRoleAssignmentsResponse": {
"type": "object",
"properties": {
"assignments": {
"type": "array",
"items": {
"$ref": "#/definitions/protoUserRoleAssignment"
}
}
}
},
"protoListValue": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/protoListOptionValue"
}
}
}
},
"protoListValuesRequest": {
"type": "object",
"properties": {
"bundleId": {
"type": "string"
},
"accountUuid": {
"type": "string"
}
}
},
"protoListValuesResponse": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/protoValueWithIdentifier"
}
}
}
},
"protoMultiChoiceList": {
"type": "object",
"properties": {
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/protoListOption"
}
}
}
},
"protoPermission": {
"type": "object",
"properties": {
"operation": {
"$ref": "#/definitions/protoPermissionOperation"
},
"constraint": {
"$ref": "#/definitions/PermissionConstraint"
}
}
},
"protoPermissionOperation": {
"type": "string",
"enum": [
"OPERATION_UNKNOWN",
"OPERATION_CREATE",
"OPERATION_READ",
"OPERATION_UPDATE",
"OPERATION_DELETE",
"OPERATION_WRITE",
"OPERATION_READWRITE"
],
"default": "OPERATION_UNKNOWN"
},
"protoRemoveRoleFromUserRequest": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"protoRemoveSettingFromBundleRequest": {
"type": "object",
"properties": {
"bundleId": {
"type": "string"
},
"settingId": {
"type": "string"
}
}
},
"protoResource": {
"type": "object",
"properties": {
"type": {
"$ref": "#/definitions/protoResourceType"
},
"id": {
"type": "string"
}
}
},
"protoResourceType": {
"type": "string",
"enum": [
"TYPE_UNKNOWN",
"TYPE_SYSTEM",
"TYPE_FILE",
"TYPE_SHARE",
"TYPE_SETTING",
"TYPE_BUNDLE",
"TYPE_USER",
"TYPE_GROUP"
],
"default": "TYPE_UNKNOWN"
},
"protoSaveBundleRequest": {
"type": "object",
"properties": {
"bundle": {
"$ref": "#/definitions/protoBundle"
}
},
"title": "---\nrequests and responses for settings bundles\n---"
},
"protoSaveBundleResponse": {
"type": "object",
"properties": {
"bundle": {
"$ref": "#/definitions/protoBundle"
}
}
},
"protoSaveValueRequest": {
"type": "object",
"properties": {
"value": {
"$ref": "#/definitions/protoValue"
}
}
},
"protoSaveValueResponse": {
"type": "object",
"properties": {
"value": {
"$ref": "#/definitions/protoValueWithIdentifier"
}
}
},
"protoSetting": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"displayName": {
"type": "string"
},
"description": {
"type": "string"
},
"intValue": {
"$ref": "#/definitions/protoInt"
},
"stringValue": {
"$ref": "#/definitions/protoString"
},
"boolValue": {
"$ref": "#/definitions/protoBool"
},
"singleChoiceValue": {
"$ref": "#/definitions/protoSingleChoiceList"
},
"multiChoiceValue": {
"$ref": "#/definitions/protoMultiChoiceList"
},
"permissionValue": {
"$ref": "#/definitions/protoPermission"
},
"resource": {
"$ref": "#/definitions/protoResource"
}
}
},
"protoSingleChoiceList": {
"type": "object",
"properties": {
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/protoListOption"
}
}
}
},
"protoString": {
"type": "object",
"properties": {
"default": {
"type": "string"
},
"required": {
"type": "boolean"
},
"minLength": {
"type": "integer",
"format": "int32"
},
"maxLength": {
"type": "integer",
"format": "int32"
},
"placeholder": {
"type": "string"
}
}
},
"protoUserRoleAssignment": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "id is generated upon saving the assignment"
},
"accountUuid": {
"type": "string"
},
"roleId": {
"type": "string",
"title": "the role_id is a bundle_id internally"
}
}
},
"protoValue": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "id is the id of the Value. It is generated on saving it."
},
"bundleId": {
"type": "string"
},
"settingId": {
"type": "string",
"description": "setting_id is the id of the setting from within its bundle."
},
"accountUuid": {
"type": "string"
},
"resource": {
"$ref": "#/definitions/protoResource"
},
"boolValue": {
"type": "boolean"
},
"intValue": {
"type": "string",
"format": "int64"
},
"stringValue": {
"type": "string"
},
"listValue": {
"$ref": "#/definitions/protoListValue"
}
}
},
"protoValueWithIdentifier": {
"type": "object",
"properties": {
"identifier": {
"$ref": "#/definitions/protoIdentifier"
},
"value": {
"$ref": "#/definitions/protoValue"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"typeUrl": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
},
"externalDocs": {
"description": "Developer Manual",
"url": "https://owncloud.github.io/extensions/settings/"
}
}