-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conversation
b6cccbc
to
de4a681
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rafaelrubbioli. Welcome! Thanks for contributing w/ Tsuru.
I did some suggestions, can you address them?
docs/openapi.yaml
Outdated
@@ -179,6 +179,79 @@ paths: | |||
'204': | |||
description: Instance is up and running | |||
|
|||
/resources/{instance}/bind-app: | |||
parameters: | |||
- name: name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: name | |
- name: instance |
docs/openapi.yaml
Outdated
|
||
/resources/{instance}/bind: | ||
parameters: | ||
- name: name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: name | |
- name: instance |
docs/openapi.yaml
Outdated
BindApp: | ||
type: object | ||
properties: | ||
app-name: | ||
type: string | ||
app-host: | ||
type: string | ||
user: | ||
type: string | ||
eventid: | ||
type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the missing fields app-hosts
and app-internal-hosts
? The later was included on tsuru/tsuru#2442... there you can find some description about.
Providing some examples can help to improve this spec.
docs/openapi.yaml
Outdated
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do nothing on these routes. We ever return 200 OK
just to follow the Tsuru Service API spec... I would mark those as deprecated to indicate this.
'201': | ||
description: Unit successfully bound to the service instance | ||
|
||
delete: |
There was a problem hiding this comment.
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?
schema: | ||
type: string | ||
|
||
post: |
There was a problem hiding this comment.
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
de4a681
to
c5375e0
Compare
@nettoclaudio Thank you for the tips, could you check if i got it right? |
Looks good, @rafaelrubbioli. We appreciate your contribution. Thanks! |
I added openapi docs for some routes that were missing
I'm not familiar with openapi, so if there's anything i did wrong or should be improved, please let me know!
Part of #39