437 lines
10 KiB
Go
437 lines
10 KiB
Go
swagger: "2.0"
|
|
info:
|
|
title: oc-catalog
|
|
description: |
|
|
OpenCloud catalog
|
|
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
|
|
<br>
|
|
operationId: EnumController.BookingStatus
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/infrastructure:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of Infrastructure
|
|
<br>
|
|
operationId: EnumController.EnumInfrastructure
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/pricing/refund/type:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumRefundType
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/pricing/strategy/buy:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumStrategyBuy
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/pricing/strategy/data:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumStrategyData
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/pricing/strategy/privilege:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumStrategyPrivilege
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/pricing/strategy/privilege/storage:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumStrategyPrivilegeStorage
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/pricing/strategy/storage:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumStrategyStorage
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/pricing/strategy/time:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumStrategyTime
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/resource/type:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumResourceType
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/status:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of status
|
|
<br>
|
|
operationId: EnumController.EnumStatus
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/storage/size:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of StorageSize
|
|
<br>
|
|
operationId: EnumController.EnumStorageSize
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/enum/storage/type:
|
|
get:
|
|
tags:
|
|
- enum
|
|
description: |-
|
|
get list of StorageType
|
|
<br>
|
|
operationId: EnumController.EnumStorageType
|
|
responses:
|
|
"200":
|
|
description: '{resource} models.resource'
|
|
/generic/:
|
|
get:
|
|
tags:
|
|
- generic
|
|
description: |-
|
|
find compute by id
|
|
<br>
|
|
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
|
|
<br>
|
|
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
|
|
<br>
|
|
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/{id}:
|
|
get:
|
|
tags:
|
|
- purchase
|
|
description: |-
|
|
find compute by id
|
|
<br>
|
|
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'
|
|
/purchase/search/{search}:
|
|
get:
|
|
tags:
|
|
- purchase
|
|
description: |-
|
|
find compute by key word
|
|
<br>
|
|
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'
|
|
/resource/{type}:
|
|
get:
|
|
tags:
|
|
- resource
|
|
description: |-
|
|
list all resources across all types
|
|
<br>
|
|
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
|
|
<br>
|
|
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}/{id}:
|
|
get:
|
|
tags:
|
|
- resource
|
|
description: |-
|
|
search resources across all types
|
|
<br>
|
|
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
|
|
<br>
|
|
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
|
|
<br>
|
|
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'
|
|
/resource/{type}/search/{search}:
|
|
get:
|
|
tags:
|
|
- resource
|
|
description: |-
|
|
search resources across all types
|
|
<br>
|
|
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'
|
|
/version/:
|
|
get:
|
|
tags:
|
|
- version
|
|
description: |-
|
|
get version
|
|
<br>
|
|
operationId: VersionController.GetAll
|
|
responses:
|
|
"200":
|
|
description: ""
|
|
/version/status:
|
|
get:
|
|
tags:
|
|
- version
|
|
description: |-
|
|
get status
|
|
<br>
|
|
operationId: VersionController.Status
|
|
responses:
|
|
"200":
|
|
description: ""
|
|
definitions:
|
|
json:
|
|
title: json
|
|
type: object
|
|
tags:
|
|
- name: generic
|
|
description: |
|
|
Operations about compute
|
|
- name: purchase
|
|
description: |
|
|
Operations about compute
|
|
- name: resource
|
|
description: |
|
|
ResourceController aggregates all resource types.
|
|
- name: enum
|
|
description: |
|
|
Operations about resource
|
|
- name: version
|
|
description: |
|
|
VersionController operations for Version
|