Skip to content

Commit

Permalink
feat(openapi): docs for tsuro bind and bind-app
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelrubbioli committed Oct 16, 2020
1 parent 6e94db7 commit b6cccbc
Showing 1 changed file with 87 additions and 2 deletions.
89 changes: 87 additions & 2 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,79 @@ paths:
'204':
description: Instance is up and running

/resources/{instance}/bind-app:
parameters:
- name: name
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: name
in: path
description: Instance name
required: true
schema:
type: string

post:
summary: Bind Unit
description: The service endpoint binds a unit to the service instance
tags:
- rpaas
responses:
'201':
description: Unit successfully bound to the service instance

delete:
summary: Unbind Unit
description: The service endpoint unbinds the unit from the service instance
tags:
- rpaas
responses:
'200':
description: Unit successfully unbound from service instance

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


BindApp:
type: object
properties:
app-name:
type: string
app-host:
type: string
user:
type: string
eventid:
type: string

Block:
type: object
properties:
Expand Down Expand Up @@ -688,4 +773,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 b6cccbc

Please sign in to comment.