Skip to content

openapiでhandler自動生成 #918

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

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Kubosaka
Copy link
Collaborator

@Kubosaka Kubosaka commented Feb 5, 2025

対応Issue

概要

  • routerでルーティングしていたものを、openapiの自動生成で行えるようにした
  • 不要なルーティングの削除

画面スクリーンショット等

  • URL
    スクリーンショット

テスト項目

備考

@Kubosaka Kubosaka marked this pull request as draft February 5, 2025 13:03
@Kubosaka Kubosaka self-assigned this Feb 12, 2025
Copy link
Collaborator

@hikahana hikahana left a comment

Choose a reason for hiding this comment

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

タイポだけ見た

func (h *Handler) PostActivities(c echo.Context) error {
activities := new(domain.Activity)
if err := c.Bind(activities); err != nil {
fmt.Println("err")
Copy link
Collaborator

Choose a reason for hiding this comment

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

これいらない。

fmt.Println("err")
return err
}
latastActivity, err := h.activityUseCase.CreateActivity(c.Request().Context(), strconv.Itoa(int(activities.UserID)), strconv.FormatBool(activities.IsDone), strconv.Itoa(int(activities.SponsorID)), activities.Feature, strconv.Itoa(int(activities.Expense)), activities.Remark, strconv.Itoa(int(activities.Design)), activities.Url)
Copy link
Collaborator

Choose a reason for hiding this comment

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

タイポ
latestActivity

idStr := strconv.Itoa(id)
activities := new(domain.Activity)
if err := c.Bind(activities); err != nil {
fmt.Println("err")
Copy link
Collaborator

Choose a reason for hiding this comment

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

これ要らない

return err
}

latastActivityStyle, err := h.activityStyleUseCase.CreateActivityStyle(c.Request().Context(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

タイポ
latestActivityStale


latastActivityStyle, err := h.activityStyleUseCase.CreateActivityStyle(c.Request().Context(),
strconv.Itoa(int(activityStyle.ActivityID)),
strconv.Itoa(int(activityStyle.SponsoStyleID)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

SponsorStyleID
これdomainの変更必要かも。修正箇所たくさん!

return err
}

latastSponsor, err := h.sponsorUseCase.CreateSponsor(c.Request().Context(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

latestSponsor


// router.GET(baseURL+"/sponsorstyles", wrapper.GetSponsorstyles)
func (h *Handler) GetSponsorstyles(c echo.Context) error {
sponsorstyles, err := h.sponsorStyleUseCase.GetSponsorStyles(c.Request().Context())
Copy link
Collaborator

Choose a reason for hiding this comment

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

sponsorStyles

return err
}

latastSponsorstyle, err := h.sponsorStyleUseCase.CreateSponsorStyle(c.Request().Context(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

latestSponsorStyle

)

// router.GET(baseURL+"/sponsorstyles", wrapper.GetSponsorstyles)
func (h *Handler) GetSponsorstyles(c echo.Context) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

これパスカルケースで出力とかできないのかな

name := params.Name
bureauID := strconv.Itoa(params.BureauId)
roleID := strconv.Itoa(params.RoleId)
latastUser, err := h.userUseCase.CreateUser(c.Request().Context(), name, bureauID, roleID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

latestUser

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.

2 participants