Skip to content

Commit

Permalink
Merge pull request #584 from dadosjusbr/inconsistent-column
Browse files Browse the repository at this point in the history
Inconsistent column
  • Loading branch information
JezzDiego authored Jan 13, 2025
2 parents e969098 + 841dc66 commit 6ffbbae
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 104 deletions.
9 changes: 9 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,9 @@ const docTemplate = `{
"id_orgao": {
"type": "string"
},
"inconsistente": {
"type": "boolean"
},
"indice_transparencia": {
"$ref": "#/definitions/papi.score"
},
Expand Down Expand Up @@ -1309,6 +1312,9 @@ const docTemplate = `{
"descontos_por_mes": {
"type": "number"
},
"inconsistente": {
"type": "boolean"
},
"meses_com_dados": {
"type": "integer"
},
Expand Down Expand Up @@ -1686,6 +1692,9 @@ const docTemplate = `{
"error": {
"$ref": "#/definitions/uiapi.procError"
},
"inconsistente": {
"type": "boolean"
},
"mes": {
"type": "integer"
},
Expand Down
9 changes: 9 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,9 @@
"id_orgao": {
"type": "string"
},
"inconsistente": {
"type": "boolean"
},
"indice_transparencia": {
"$ref": "#/definitions/papi.score"
},
Expand Down Expand Up @@ -1300,6 +1303,9 @@
"descontos_por_mes": {
"type": "number"
},
"inconsistente": {
"type": "boolean"
},
"meses_com_dados": {
"type": "integer"
},
Expand Down Expand Up @@ -1677,6 +1683,9 @@
"error": {
"$ref": "#/definitions/uiapi.procError"
},
"inconsistente": {
"type": "boolean"
},
"mes": {
"type": "integer"
},
Expand Down
6 changes: 6 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ definitions:
$ref: '#/definitions/papi.miError'
id_orgao:
type: string
inconsistente:
type: boolean
indice_transparencia:
$ref: '#/definitions/papi.score'
mes:
Expand Down Expand Up @@ -364,6 +366,8 @@ definitions:
type: number
descontos_por_mes:
type: number
inconsistente:
type: boolean
meses_com_dados:
type: integer
num_membros:
Expand Down Expand Up @@ -612,6 +616,8 @@ definitions:
type: number
error:
$ref: '#/definitions/uiapi.procError'
inconsistente:
type: boolean
mes:
type: integer
outras_remuneracoes:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/dadosjusbr/proto v0.0.0-20221212025627-91c60aa3cd12
github.com/dadosjusbr/storage v0.0.0-20240923172949-d3b675a3e292
github.com/dadosjusbr/storage v0.0.0-20241220002941-04adcca6c05e
github.com/gocarina/gocsv v0.0.0-20220712153207-8b2118da4570
github.com/golang/mock v1.6.0
github.com/joho/godotenv v1.4.0
Expand Down
11 changes: 2 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,11 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/dadosjusbr/datapackage v0.0.0-20230904162108-6e2264aafb68/go.mod h1:o1FghJC46mR+lgHcQWVve/q84/SAd0WVdYMcgq88BBU=
github.com/dadosjusbr/datapackage v0.0.0-20240320203926-5f369dadd3a5/go.mod h1:xDZc4jX8VDOP7SFo793x0Q8gjUjuMSOmNEUG/wqLKAw=
github.com/dadosjusbr/proto v0.0.0-20221212025627-91c60aa3cd12 h1:ufl8nbCEo6g2VHUbedGy0gYk9Sgrynf9rcnzuSw4TEg=
github.com/dadosjusbr/proto v0.0.0-20221212025627-91c60aa3cd12/go.mod h1:gPA7VxjEmyez/xtln4qBj+tM1NO0/zcw3ryjxTRNSco=
github.com/dadosjusbr/storage v0.0.0-20240315221019-5da10c81ab80 h1:mo6k/MAl6aF662JFUYHxqCNvRkX8OXZN0DmQKJe55D4=
github.com/dadosjusbr/storage v0.0.0-20240315221019-5da10c81ab80/go.mod h1:PszGy6CDoG3kNLjIsCmwD3MAWED7xL7U/OWj7ajsiHc=
github.com/dadosjusbr/storage v0.0.0-20240514131514-43ac5da3ae8a h1:1LyzfsNzKgLjC4/cyQr+N724a4dcRCHB5yIauAnhhcI=
github.com/dadosjusbr/storage v0.0.0-20240514131514-43ac5da3ae8a/go.mod h1:rIM/dbZMdrMfVnZgNgRNRRtsxfhSMH8S8X7MZEeKkrQ=
github.com/dadosjusbr/storage v0.0.0-20240913213102-72765cc03b4e h1:RNcbmof3iPyJQNWbEPkNyKKffmQ8jkZa8QH/vZ5eJP0=
github.com/dadosjusbr/storage v0.0.0-20240913213102-72765cc03b4e/go.mod h1:rIM/dbZMdrMfVnZgNgRNRRtsxfhSMH8S8X7MZEeKkrQ=
github.com/dadosjusbr/storage v0.0.0-20240923172949-d3b675a3e292 h1:cgrdaqWjNN9enNcWPaPtqWFbxo1bLWz9C/Lxhke4WM4=
github.com/dadosjusbr/storage v0.0.0-20240923172949-d3b675a3e292/go.mod h1:rIM/dbZMdrMfVnZgNgRNRRtsxfhSMH8S8X7MZEeKkrQ=
github.com/dadosjusbr/storage v0.0.0-20241220002941-04adcca6c05e h1:1tg4+bUdok+k92a8ucui4PCe1J6ST19d88PuYR8pfQg=
github.com/dadosjusbr/storage v0.0.0-20241220002941-04adcca6c05e/go.mod h1:rIM/dbZMdrMfVnZgNgRNRRtsxfhSMH8S8X7MZEeKkrQ=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
3 changes: 2 additions & 1 deletion papi/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ func (h handler) V2GetMonthlyInfo(c echo.Context) error {
ParserVersion: monthlyInfo.ParserVersion,
},
ManualCollection: monthlyInfo.ManualCollection,
Inconsistent: monthlyInfo.Inconsistent,
}
//O status 4 informa que os dados estão indisponíveis. Ao removê-los dos resultados da API, garantimos que eles sejam exibidos como se não houvesse dados.
} else if monthlyInfo.ProcInfo.Status != 4 {
Expand Down Expand Up @@ -694,7 +695,7 @@ func (h handler) V2GetAggregateIndexesWithParams(c echo.Context) error {
// @Produce json
// @Success 200 {object} []aggregateIndexesByGroup "Requisição bem sucedida."
// @Failure 500 {string} string "Erro interno do servidor."
// @Router /v2/indice [get]
// @Router /v2/indice [get]
func (h handler) V2GetAggregateIndexes(c echo.Context) error {
agregado := c.QueryParam("agregado")
detalhe := c.QueryParam("detalhe")
Expand Down
1 change: 1 addition & 0 deletions papi/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type summaryzedMI struct {
Collect *collect `json:"dados_coleta,omitempty"`
ManualCollection bool `json:"coleta_manual"`
Error *miError `json:"error,omitempty"`
Inconsistent bool `json:"inconsistente"`
}

type agency struct {
Expand Down
Loading

0 comments on commit 6ffbbae

Please sign in to comment.