582 lines
19 KiB
Go
582 lines
19 KiB
Go
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "oc-catalog",
|
|
"description": "OpenCloud catalog\n",
|
|
"version": "1.0.0",
|
|
"termsOfService": "http://cloud.o-forge.io/",
|
|
"contact": {
|
|
"email": "admin@o-cloud.io"
|
|
},
|
|
"license": {
|
|
"name": "AGPL",
|
|
"url": "https://www.gnu.org/licenses/agpl-3.0.html"
|
|
}
|
|
},
|
|
"basePath": "/oc",
|
|
"paths": {
|
|
"/enum/booking/status": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of Infrastructure\n\u003cbr\u003e",
|
|
"operationId": "EnumController.BookingStatus",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/infrastructure": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of Infrastructure\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumInfrastructure",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/pricing/refund/type": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumRefundType",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/pricing/strategy/buy": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStrategyBuy",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/pricing/strategy/data": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStrategyData",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/pricing/strategy/privilege": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStrategyPrivilege",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/pricing/strategy/privilege/storage": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStrategyPrivilegeStorage",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/pricing/strategy/storage": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStrategyStorage",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/pricing/strategy/time": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStrategyTime",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/resource/type": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumResourceType",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/status": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of status\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStatus",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/storage/size": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of StorageSize\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStorageSize",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/enum/storage/type": {
|
|
"get": {
|
|
"tags": [
|
|
"enum"
|
|
],
|
|
"description": "get list of StorageType\n\u003cbr\u003e",
|
|
"operationId": "EnumController.EnumStorageType",
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/generic/": {
|
|
"get": {
|
|
"tags": [
|
|
"generic"
|
|
],
|
|
"description": "find compute by id\n\u003cbr\u003e",
|
|
"operationId": "GeneralController.GetAll",
|
|
"parameters": [
|
|
{
|
|
"in": "formData",
|
|
"name": "file",
|
|
"description": "File to upload",
|
|
"required": true,
|
|
"type": "file"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{compute} models.workflow"
|
|
},
|
|
"406": {
|
|
"description": "{string} string \"Bad request\""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/purchase/": {
|
|
"get": {
|
|
"tags": [
|
|
"purchase"
|
|
],
|
|
"description": "find compute by id\n\u003cbr\u003e",
|
|
"operationId": "PurchaseController.GetAll",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "is_draft",
|
|
"description": "draft wished",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{compute} models.compute"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"purchase"
|
|
],
|
|
"description": "create compute\n\u003cbr\u003e",
|
|
"operationId": "PurchaseController.Create",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "compute",
|
|
"description": "body for compute content (Json format)",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{compute} models.compute"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/purchase/search/{search}": {
|
|
"get": {
|
|
"tags": [
|
|
"purchase"
|
|
],
|
|
"description": "find compute by key word\n\u003cbr\u003e",
|
|
"operationId": "PurchaseController.Get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "search",
|
|
"description": "the search you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "is_draft",
|
|
"description": "draft wished",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{compute} models.compute"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/purchase/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"purchase"
|
|
],
|
|
"description": "find compute by id\n\u003cbr\u003e",
|
|
"operationId": "PurchaseController.Get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{compute} models.compute"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/resource/{type}": {
|
|
"get": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"description": "list all resources across all types\n\u003cbr\u003e",
|
|
"operationId": "ResourceController.GetAll",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "type",
|
|
"description": "the type you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "is_draft",
|
|
"description": "draft wished",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"description": "search resources across all types\n\u003cbr\u003e",
|
|
"operationId": "ResourceController.Post",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "type",
|
|
"description": "the type you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "body",
|
|
"name": "data",
|
|
"description": "body for data content (Json format)",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/resource/{type}/search/{search}": {
|
|
"get": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"description": "search resources across all types\n\u003cbr\u003e",
|
|
"operationId": "ResourceController.Search",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "type",
|
|
"description": "the type you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "search",
|
|
"description": "the search you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "is_draft",
|
|
"description": "draft wished",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/resource/{type}/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"description": "search resources across all types\n\u003cbr\u003e",
|
|
"operationId": "ResourceController.Get",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "type",
|
|
"description": "the type you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "is_draft",
|
|
"description": "draft wished",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"description": "search resources across all types\n\u003cbr\u003e",
|
|
"operationId": "ResourceController.Put",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "type",
|
|
"description": "the type you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "body",
|
|
"name": "data",
|
|
"description": "body for data content (Json format)",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"description": "search resources across all types\n\u003cbr\u003e",
|
|
"operationId": "ResourceController.Delete",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "type",
|
|
"description": "the type you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"description": "the id you want to get",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "is_draft",
|
|
"description": "draft wished",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{resource} models.resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version/": {
|
|
"get": {
|
|
"tags": [
|
|
"version"
|
|
],
|
|
"description": "get version\n\u003cbr\u003e",
|
|
"operationId": "VersionController.GetAll",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version/status": {
|
|
"get": {
|
|
"tags": [
|
|
"version"
|
|
],
|
|
"description": "get status\n\u003cbr\u003e",
|
|
"operationId": "VersionController.Status",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"json": {
|
|
"title": "json",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "generic",
|
|
"description": "Operations about compute\n"
|
|
},
|
|
{
|
|
"name": "purchase",
|
|
"description": "Operations about compute\n"
|
|
},
|
|
{
|
|
"name": "resource",
|
|
"description": "ResourceController aggregates all resource types.\n"
|
|
},
|
|
{
|
|
"name": "enum",
|
|
"description": "Operations about resource\n"
|
|
},
|
|
{
|
|
"name": "version",
|
|
"description": "VersionController operations for Version\n"
|
|
}
|
|
]
|
|
} |