Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(openapi): docs for tsuro bind and bind-app #87

Merged
merged 2 commits into from
Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide the operation ID for this route? +1

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide the operation ID for this route?

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