@@ -39,14 +39,14 @@ func (h handler) V1GetAgencyById(c echo.Context) error {
3939 return c .JSON (http .StatusOK , agency )
4040}
4141
42- // @ID GetAgencyById
43- // @Tags public_api
44- // @Description Busca um órgão específico utilizando seu ID.
45- // @Produce json
46- // @Param orgao path string true "ID do órgão. Exemplos: tjal, tjba, mppb."
47- // @Success 200 {object} agency "Requisição bem sucedida."
48- // @Failure 404 {string} string "Órgão não encontrado."
49- // @Router /v2/orgao/{orgao} [get]
42+ // @ID GetAgencyById
43+ // @Tags public_api
44+ // @Description Busca um órgão específico utilizando seu ID.
45+ // @Produce json
46+ // @Param orgao path string true "ID do órgão. Exemplos: tjal, tjba, mppb."
47+ // @Success 200 {object} agency "Requisição bem sucedida."
48+ // @Failure 404 {string} string "Órgão não encontrado."
49+ // @Router /v2/orgao/{orgao} [get]
5050func (h handler ) V2GetAgencyById (c echo.Context ) error {
5151 agencyName := c .Param ("orgao" )
5252 strAgency , err := h .client .Db .GetAgency (agencyName )
@@ -92,13 +92,13 @@ func (h handler) V1GetAllAgencies(c echo.Context) error {
9292 return c .JSON (http .StatusOK , agencies )
9393}
9494
95- // @ID GetAllAgencies
96- // @Tags public_api
97- // @Description Busca todos os órgãos disponíveis.
98- // @Produce json
99- // @Success 200 {object} []agency "Requisição bem sucedida."
100- // @Failure 500 {string} string "Erro interno do servidor."
101- // @Router /v2/orgaos [get]
95+ // @ID GetAllAgencies
96+ // @Tags public_api
97+ // @Description Busca todos os órgãos disponíveis.
98+ // @Produce json
99+ // @Success 200 {object} []agency "Requisição bem sucedida."
100+ // @Failure 500 {string} string "Erro interno do servidor."
101+ // @Router /v2/orgaos [get]
102102func (h handler ) V2GetAllAgencies (c echo.Context ) error {
103103 strAgencies , err := h .client .Db .GetAllAgencies ()
104104 if err != nil {
@@ -264,17 +264,17 @@ func (h handler) GetMonthlyInfo(c echo.Context) error {
264264 return c .JSON (http .StatusOK , sumMI )
265265}
266266
267- // @ID GetMonthlyInfo
268- // @Tags public_api
269- // @Description Busca um dado mensal de um órgão
270- // @Produce json
271- // @Success 200 {object} summaryzedMI "Requisição bem sucedida"
272- // @Failure 400 {string} string "Parâmetros inválidos"
273- // @Failure 404 {string} string "Não existem dados para os parâmetros informados"
274- // @Param ano path int true "Ano"
275- // @Param orgao path string true "Órgão"
276- // @Param mes path int true "Mês"
277- // @Router /v2/dados/{orgao}/{ano}/{mes} [get]
267+ // @ID GetMonthlyInfo
268+ // @Tags public_api
269+ // @Description Busca um dado mensal de um órgão
270+ // @Produce json
271+ // @Success 200 {object} summaryzedMI "Requisição bem sucedida"
272+ // @Failure 400 {string} string "Parâmetros inválidos"
273+ // @Failure 404 {string} string "Não existem dados para os parâmetros informados"
274+ // @Param ano path int true "Ano"
275+ // @Param orgao path string true "Órgão"
276+ // @Param mes path int true "Mês"
277+ // @Router /v2/dados/{orgao}/{ano}/{mes} [get]
278278func (h handler ) V2GetMonthlyInfo (c echo.Context ) error {
279279 year , err := strconv .Atoi (c .Param ("ano" ))
280280 if err != nil {
@@ -398,16 +398,16 @@ func (h handler) V2GetMonthlyInfo(c echo.Context) error {
398398 return c .JSON (http .StatusOK , sumMI )
399399}
400400
401- // @ID GetMonthlyInfosByYear
402- // @Tags public_api
403- // @Description Busca os dados mensais de um órgão por ano
404- // @Produce json
405- // @Success 200 {object} []summaryzedMI "Requisição bem sucedida"
406- // @Failure 400 {string} string "Parâmetros inválidos"
407- // @Failure 404 {string} string "Não existem dados para os parâmetros informados"
408- // @Param ano path int true "Ano"
409- // @Param orgao path string true "Órgão"
410- // @Router /v2/dados/{orgao}/{ano} [get]
401+ // @ID GetMonthlyInfosByYear
402+ // @Tags public_api
403+ // @Description Busca os dados mensais de um órgão por ano
404+ // @Produce json
405+ // @Success 200 {object} []summaryzedMI "Requisição bem sucedida"
406+ // @Failure 400 {string} string "Parâmetros inválidos"
407+ // @Failure 404 {string} string "Não existem dados para os parâmetros informados"
408+ // @Param ano path int true "Ano"
409+ // @Param orgao path string true "Órgão"
410+ // @Router /v2/dados/{orgao}/{ano} [get]
411411func (h handler ) GetMonthlyInfosByYear (c echo.Context ) error {
412412 year , err := strconv .Atoi (c .Param ("ano" ))
413413 if err != nil {
@@ -532,16 +532,16 @@ func (h handler) GetMonthlyInfosByYear(c echo.Context) error {
532532 return c .JSON (http .StatusOK , sumMI )
533533}
534534
535- // @ID GetAggregateIndexesWithParams
536- // @Tags public_api
537- // @Description Busca as informações de índices de um grupo ou órgão específico.
538- // @Produce json
539- // @Success 200 {object} []aggregateIndexes "Requisição bem sucedida."
540- // @Failure 400 {string} string "Requisição inválida."
541- // @Failure 500 {string} string "Erro interno do servidor."
542- // @Param param path string true "'grupo' ou 'orgao'"
543- // @Param valor path string true "Jurisdição ou ID do órgao"
544- // @Router /v2/indice/{param}/{valor} [get]
535+ // @ID GetAggregateIndexesWithParams
536+ // @Tags public_api
537+ // @Description Busca as informações de índices de um grupo ou órgão específico.
538+ // @Produce json
539+ // @Success 200 {object} []aggregateIndexes "Requisição bem sucedida."
540+ // @Failure 400 {string} string "Requisição inválida."
541+ // @Failure 500 {string} string "Erro interno do servidor."
542+ // @Param param path string true "'grupo' ou 'orgao'"
543+ // @Param valor path string true "Jurisdição ou ID do órgao"
544+ // @Router /v2/indice/{param}/{valor} [get]
545545func (h handler ) V2GetAggregateIndexesWithParams (c echo.Context ) error {
546546 param := c .Param ("param" )
547547 valor := c .Param ("valor" )
@@ -689,13 +689,13 @@ func (h handler) V2GetAggregateIndexesWithParams(c echo.Context) error {
689689 return c .JSON (http .StatusOK , aggregate )
690690}
691691
692- // @ID GetAggregateIndexes
693- // @Tags public_api
694- // @Description Busca as informações de índices de todos os órgãos.
695- // @Produce json
696- // @Success 200 {object} []aggregateIndexesByGroup "Requisição bem sucedida."
697- // @Failure 500 {string} string "Erro interno do servidor."
698- // @Router /v2/indice [get]
692+ // @ID GetAggregateIndexes
693+ // @Tags public_api
694+ // @Description Busca as informações de índices de todos os órgãos.
695+ // @Produce json
696+ // @Success 200 {object} []aggregateIndexesByGroup "Requisição bem sucedida."
697+ // @Failure 500 {string} string "Erro interno do servidor."
698+ // @Router /v2/indice [get]
699699func (h handler ) V2GetAggregateIndexes (c echo.Context ) error {
700700 agregado := c .QueryParam ("agregado" )
701701 detalhe := c .QueryParam ("detalhe" )
@@ -799,14 +799,14 @@ func (h handler) V2GetAggregateIndexes(c echo.Context) error {
799799 return c .JSON (http .StatusOK , dados )
800800}
801801
802- // @ID GetAllAgencyInformation
803- // @Tags public_api
804- // @Description Busca todas as informações de um órgão específico.
805- // @Produce json
806- // @Success 200 {object} allAgencyInformation "Requisição bem sucedida."
807- // @Failure 400 {string} string "Requisição inválida."
808- // @Param orgao path string true "órgão"
809- // @Router /v2/dados/{orgao} [get]
802+ // @ID GetAllAgencyInformation
803+ // @Tags public_api
804+ // @Description Busca todas as informações de um órgão específico.
805+ // @Produce json
806+ // @Success 200 {object} allAgencyInformation "Requisição bem sucedida."
807+ // @Failure 400 {string} string "Requisição inválida."
808+ // @Param orgao path string true "órgão"
809+ // @Router /v2/dados/{orgao} [get]
810810func (h handler ) V2GetAllAgencyInformation (c echo.Context ) error {
811811 agency := strings .ToLower (c .Param ("orgao" ))
812812
0 commit comments