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

增加 route_boards 相關註解 #195

Conversation

unknowntpo
Copy link
Contributor

@unknowntpo unknowntpo commented Apr 27, 2021

👏 解決掉的 issue / Resolved Issues

📝 相關的 issue / Related Issues

⛏ 變更內容 / Details of Changes

  • 新增註解
  • 新增 handler 的 Request URL 與 API Doc link
  • 對還沒列入 swagger 的 API Doc link 加上 TODO prefix

@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2021

Codecov Report

Merging #195 (556ff9f) into development (e634abe) will increase coverage by 3.68%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #195      +/-   ##
===============================================
+ Coverage        39.32%   43.00%   +3.68%     
===============================================
  Files               22       25       +3     
  Lines             1030     1286     +256     
===============================================
+ Hits               405      553     +148     
- Misses             565      647      +82     
- Partials            60       86      +26     
Impacted Files Coverage Δ
internal/delivery/http/route_boards.go 56.57% <ø> (ø)
internal/config/config.go 77.27% <0.00%> (-5.23%) ⬇️
internal/delivery/http/route_users.go 50.80% <0.00%> (-2.49%) ⬇️
internal/usecase/user.go 8.41% <0.00%> (-0.25%) ⬇️
internal/usecase/token.go 0.00% <0.00%> (ø)
internal/usecase/usecase.go 100.00% <0.00%> (ø)
internal/repository/article.go 0.00% <0.00%> (ø)
internal/delivery/http/route_create_article.go 68.18% <0.00%> (ø)
internal/usecase/mail.go 100.00% <0.00%> (ø)
internal/delivery/http/route_forward_article.go 70.17% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e634abe...556ff9f. Read the comment docs.

@y2468101216
Copy link
Collaborator

LGTM

Comment on lines 13 to 15
// getBoardList get the board list for user with userID
// Request URL: /v1/boards
// API Doc: https://pttapp.cc/swagger/#/%E7%9C%8B%E6%9D%BF%E9%83%A8%E5%88%86/get_v1_boards
Copy link
Contributor Author

Choose a reason for hiding this comment

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

我覺得我們需要統一一個關於 handler 的註解格式,
例如我這裡用

// getBoardList ...
// Request URL: /v1/boards
// API Doc: ...

#142 用的是

// getUserFavorites is a http handler function which will get favorite list of user with userID
// to w. request path should be /v1/users/{{user_id}}/favorites
// Please see: ...

Copy link
Member

Choose a reason for hiding this comment

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

我覺得please see 的用法比較好

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Request URL: 的部分呢?
另外,註解格式是否可以放在 documentation 內,方便大家參考?

Copy link
Collaborator

Choose a reason for hiding this comment

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

註解格式可以考慮放在 doc 裡,不過要放在哪裡又是一個要討論的點。
而且現在也沒有要求貢獻者寫註解,我個人是覺得還好。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok!

Change title: API Doc to Please see.
Copy link
Member

@PichuChen PichuChen left a comment

Choose a reason for hiding this comment

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

LGTM

@PichuChen PichuChen merged commit f9735ea into Ptt-official-app:development May 4, 2021
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.

[主線] [PTT] 增加 route_borad 相關註解
4 participants