Cb-tumblebug: Move MCIS refine feature's REST API: from `GET /mcis` to `GET /control/mcis`

Created on 16 Sep 2021  ยท  1Comment  ยท  Source: cloud-barista/cb-tumblebug

  • Related PR: #695
  • This issue is a sub-issue of #749.

What would you like to be enhanced
:
Move MCIS refine feature's REST API: from GET /mcis to GET /control/mcis.

Why is this needed
:

/ns/{nsId}/mcis/{mcisId} [get] API์—๋Š” ์ •๋ณด/์ƒํƒœ ์กฐํšŒ ๊ธฐ๋Šฅ (metadata, status, id, simple) ๋งŒ ๋‚จ๊ธด๋‹ค๋ฉด,
refine ๊ธฐ๋Šฅ์€ ๋‹ค๋ฅธ API๋กœ ์˜ฎ๊ธฐ๋Š” ๊ฒƒ์ด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๐Ÿ˜Š

๊ณต๊ฐํ•ฉ๋‹ˆ๋‹ค..^^ ์ผ๋‹จ api๋ฅผ ์ฝ๊ธฐ ์ „์šฉ ๊ตฌ๋ถ„์„ ์œ„ํ•ด ๋‚˜๋ˆ„๋Š” ์ƒํ™ฉ์ด๋ผ ์˜ค๋ธŒ์ ํŠธ์— ์ˆ˜์ •์„ ๊ฐ€ํ•˜๋Š” refine์€ ์˜ฎ๊ธฐ๋Š” ๊ฒƒ์ด ๋งž์„ ๊ฒƒ ๊ฐ™์€๋ฐ,

Refine์ด ๋ผ์ดํ”„์‚ฌ์ดํด์„ ์œ„ํ•œ ์ •๋ฆฌ์˜ต์…˜์„ ๊ฒƒ์„ ๊ณ ๋ คํ•˜๋ฉด
/ns/{nsId}/control/mcis/{mcisId} ์— ๋“ค์–ด๊ฐ€๋„ ๋˜์ง€ ์•Š์„๊นŒ ์‹ถ๋„ค์š”.^^

Proposed solution
:

https://github.com/cloud-barista/cb-tumblebug/blob/main/src/api/rest/server/mcis/control.go ํŒŒ์ผ์˜
func RestGetMcis(c echo.Context) error ํ•จ์ˆ˜์˜
else if ๊ตฌ๋ฌธ์—์„œ action == "refine" ์กฐ๊ฑด์„ ์‚ญ์ œํ•˜๊ณ 

func RestGetControlMcis(c echo.Context) error ํ•จ์ˆ˜์˜
if ๊ตฌ๋ฌธ์— action == "refine" ์กฐ๊ฑด์„ ์ถ”๊ฐ€

์œ„์˜ ๋‘ ํ•จ์ˆ˜์˜ Go annotations (for Swagger) ๋ฅผ ์ ์ ˆํžˆ ์ˆ˜์ •

src/ ์—์„œ make swag ์‹คํ–‰ํ•˜์—ฌ Swagger doc ์—…๋ฐ์ดํŠธ

ํ…Œ์ŠคํŠธ ์Šคํฌ๋ฆฝํŠธ์˜ REST API path๋„ ์ ์ ˆํžˆ ์ˆ˜์ •

enhancement help wanted

Most helpful comment

/assign @PARKINHYO

>All comments

/assign @PARKINHYO

Was this page helpful?
0 / 5 - 0 ratings