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

Group tags by era (Shelley vs Byron) in swagger documentation #841

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Oct 16, 2019

Issue Number

#774 #775 #776 #777 #778

Overview

  • I have renamed /external-transactions to /proxy/transactions to better convey its meaning
  • I have renamed all /byron/wallets to /byron-wallets as per the discussion we had on slack
  • I have renamed /.../migrate to /.../migrations, REST is about resources, not actions.
  • I have grouped and organize API tags by eras such that it's more readable:

Screenshot from 2019-10-16 13-38-08

Comments

⚠️ base branch is jonathanknowles/migrate-byron-wallet-return-type

@KtorZ KtorZ force-pushed the KtorZ/review-swagger-hierarchy branch 3 times, most recently from 95d8c3d to 606e03d Compare October 16, 2019 11:54
@KtorZ KtorZ self-assigned this Oct 16, 2019
get:
operationId: listByronWallets
tags: ["Byron Wallets"]
summary: List
description: |
<p align="right">status: <strong>not implemented</strong></p>
<p align="right">status: <strong>provisional</strong></p>
Copy link
Contributor

Choose a reason for hiding this comment

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

as discussed... under testing sounds better...

Copy link
Member Author

Choose a reason for hiding this comment

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

@KtorZ KtorZ force-pushed the KtorZ/review-swagger-hierarchy branch from 606e03d to 06cd335 Compare October 16, 2019 12:07
@KtorZ KtorZ changed the base branch from jonathanknowles/migrate-byron-wallet-return-type to master October 16, 2019 12:07
@KtorZ
Copy link
Member Author

KtorZ commented Oct 16, 2019

bors try

Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

👍

iohk-bors bot added a commit that referenced this pull request Oct 16, 2019
@KtorZ
Copy link
Member Author

KtorZ commented Oct 16, 2019

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 16, 2019

try

Build failed

@KtorZ
Copy link
Member Author

KtorZ commented Oct 16, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 16, 2019
841: Group tags by era (Shelley vs Byron) in swagger documentation r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#774 #775 #776 #777 #778 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have renamed `/external-transactions` to `/proxy/transactions` to better convey its meaning
- [x] I have renamed all `/byron/wallets` to `/byron-wallets` as per the discussion we had on slack
- [x] I have renamed `/.../migrate` to `/.../migrations`, REST is about resources, not actions. 
- [x] I have grouped and organize API tags by eras such that it's more readable:

![Screenshot from 2019-10-16 13-38-08](https://user-images.githubusercontent.com/5680256/66916252-24946900-f01b-11e9-9060-9a6aa88d0ac4.png)


# Comments

<!-- Additional comments or screenshots to attach if any -->

:warning: base branch is `jonathanknowles/migrate-byron-wallet-return-type`

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
Copy link
Member

@jonathanknowles jonathanknowles left a comment

Choose a reason for hiding this comment

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

@KtorZ

I have a some questions about this PR:

  1. If /proxy refers to a resource, then to what resource does it refer?
  2. If /proxy doesn't refer to a resource, then why can we have /proxy/transactions but not /byron/wallets?

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 16, 2019

Build failed

@KtorZ
Copy link
Member Author

KtorZ commented Oct 16, 2019

@jonathanknowles

The proxy is so-to-speak, the node's client itself. So, we might (conceptually) imagine other endpoint on that resource, like /proxy/tip or /proxy/health. Doing something like GET /proxy probably doesn't make sense as we would have to come to a representation for that proxy, but it could be possible.

byron does not refer to anything tangible, it's a type of wallet. byron is nothing that can be represented. You could argue that we could have these "era" resources, and have somethings like:

/eras/byron/wallets/...
/eras/shelley/wallets/...

but it's a bit far-fetched (and would cause a pretty big changes for all other endpoints to keep the consistency).
edit: So to be clear, byron or shelley acts more as ids here, or discriminant for resources.

Going further with RESTful practices, I recommend reading: https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#restful

@KtorZ
Copy link
Member Author

KtorZ commented Oct 16, 2019

bors try

iohk-bors bot added a commit that referenced this pull request Oct 16, 2019
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 16, 2019

try

Build failed

…lley)

Also renamed '/byron/wallets' to '/byron-wallets' to better reflect what the resource should be
@KtorZ KtorZ force-pushed the KtorZ/review-swagger-hierarchy branch from 06cd335 to d9bcf54 Compare October 16, 2019 14:04
@KtorZ
Copy link
Member Author

KtorZ commented Oct 16, 2019

Fixed tests and re-run integration tests locally 👍, they pass.

@KtorZ
Copy link
Member Author

KtorZ commented Oct 16, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 16, 2019
841: Group tags by era (Shelley vs Byron) in swagger documentation r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#774 #775 #776 #777 #778 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have renamed `/external-transactions` to `/proxy/transactions` to better convey its meaning
- [x] I have renamed all `/byron/wallets` to `/byron-wallets` as per the discussion we had on slack
- [x] I have renamed `/.../migrate` to `/.../migrations`, REST is about resources, not actions. 
- [x] I have grouped and organize API tags by eras such that it's more readable:

![Screenshot from 2019-10-16 13-38-08](https://user-images.githubusercontent.com/5680256/66916252-24946900-f01b-11e9-9060-9a6aa88d0ac4.png)


# Comments

<!-- Additional comments or screenshots to attach if any -->

:warning: base branch is `jonathanknowles/migrate-byron-wallet-return-type`

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 16, 2019

Build succeeded

@iohk-bors iohk-bors bot merged commit d9bcf54 into master Oct 16, 2019
@KtorZ KtorZ added this to the Byron Wallet Support milestone Oct 17, 2019
@KtorZ KtorZ deleted the KtorZ/review-swagger-hierarchy branch October 18, 2019 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants