Skip to content

Commit

Permalink
doc(openapi): describe unit and app bind routes from Tsuru Service API (
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelrubbioli authored Oct 19, 2020
1 parent 85d163d commit 4222851
Showing 1 changed file with 103 additions and 2 deletions.
105 changes: 103 additions & 2 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,83 @@ paths:
'204':
description: Instance is up and running

/resources/{instance}/bind-app:
parameters:
- name: instance
in: path
description: Instance name
required: true
schema:
type: string

post:
summary: Binds the app to the rpaas instance
description: This endpoint is part of Tsuru Service API.
operationId: BindApp
tags:
- rpaas
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BindApp'
responses:
'201':
description: App successfully bound to the rpaas instance
'404':
description: rpaas instance does not exist
'412':
description: rpaas instance not ready

delete:
summary: Unbinds the app from the rpaas instance
description: This endpoint is part of Tsuru Service API.
operationId: UnbindApp
tags:
- rpaas
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BindApp'
responses:
'200':
description: App successfully unbound from rpaas instance
'404':
description: rpaas instance does not exist

/resources/{instance}/bind:
parameters:
- name: instance
in: path
description: Instance name
required: true
schema:
type: string

post:
operationId: BindInstance
deprecated: true
summary: Bind Unit
description: Not used, just to follow Tsuru Service API spec
tags:
- rpaas
responses:
'200':
description: Nothing happens

delete:
operationId: UnbindInstance
deprecated: true
summary: Unbind Unit
description: Not used, just to follow Tsuru Service API spec
tags:
- rpaas
responses:
'200':
description: Nothing happens

/resources/{instance}/info:
get:
summary: Get a summary informations about an instance
Expand Down Expand Up @@ -374,7 +451,31 @@ components:
example: 99
minimum: 0
maximum: 100


BindApp:
type: object
properties:
app-name:
type: string
example: app1
app-host:
type: string
example: app1.tsuru.example.com
user:
type: string
eventid:
type: string
app-hosts:
type: array
items:
type: string
example: app1.tsuru.example.com
app-internal-hosts:
type: array
items:
type: string
example: localService.namespace

Block:
type: object
properties:
Expand Down Expand Up @@ -688,4 +789,4 @@ components:
example: '{"image": "my.registry.test/nginx:v1.18.0"}'
lb-name:
type: string
example: my-instance.custom.example.com
example: my-instance.custom.example.com

0 comments on commit 4222851

Please sign in to comment.