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

atualizando a rota /indice #568

Merged
merged 4 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ const docTemplate = `{
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"enum": [
Expand Down Expand Up @@ -757,7 +757,7 @@ const docTemplate = `{
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"enum": [
Expand Down Expand Up @@ -819,7 +819,7 @@ const docTemplate = `{
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"enum": [
Expand Down Expand Up @@ -895,7 +895,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/papi.aggregateIndexes"
"$ref": "#/definitions/papi.aggregateIndexesByGroup"
}
}
},
Expand All @@ -917,7 +917,7 @@ const docTemplate = `{
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"type": "integer",
Expand Down Expand Up @@ -955,7 +955,7 @@ const docTemplate = `{
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"type": "integer",
Expand Down Expand Up @@ -1319,6 +1319,35 @@ const docTemplate = `{
}
}
},
"papi.aggregateIndexesByGroup": {
"type": "object",
"properties": {
"justica-estadual": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-federal": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-militar": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-do-trabalho": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-superior": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-eleitoral": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"ministerios-publicos": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"conselhos-de-justica": {
"$ref": "#/definitions/papi.aggregateIndexes"
}
}
},
"uiapi.agency": {
"type": "object",
"properties": {
Expand Down
41 changes: 35 additions & 6 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"enum": [
Expand Down Expand Up @@ -747,7 +747,7 @@
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"enum": [
Expand Down Expand Up @@ -809,7 +809,7 @@
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"enum": [
Expand Down Expand Up @@ -885,7 +885,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/papi.aggregateIndexes"
"$ref": "#/definitions/papi.aggregateIndexesByGroup"
}
}
},
Expand All @@ -907,7 +907,7 @@
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"type": "integer",
Expand Down Expand Up @@ -945,7 +945,7 @@
"tags": [
"public_api"
],
"operationId": "GetAggregateIndexes",
"operationId": "GetAggregateIndexesWithParams",
"parameters": [
{
"type": "integer",
Expand Down Expand Up @@ -1309,6 +1309,35 @@
}
}
},
"papi.aggregateIndexesByGroup": {
"type": "object",
"properties": {
"justica-estadual": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-federal": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-militar": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-do-trabalho": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-superior": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"justica-eleitoral": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"ministerios-publicos": {
"$ref": "#/definitions/papi.aggregateIndexes"
},
"conselhos-de-justica": {
"$ref": "#/definitions/papi.aggregateIndexes"
}
}
},
"uiapi.agency": {
"type": "object",
"properties": {
Expand Down
29 changes: 24 additions & 5 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,25 @@ definitions:
detalhe:
$ref: "#/definitions/papi.indexInformation"
type: object
papi.aggregateIndexesByGroup:
properties:
justica-estadual:
$ref: "#/definitions/papi.aggregateIndexes"
justica-federal:
$ref: "#/definitions/papi.aggregateIndexes"
justica-militar:
$ref: "#/definitions/papi.aggregateIndexes"
justica-do-trabalho:
$ref: "#/definitions/papi.aggregateIndexes"
justica-superior:
$ref: "#/definitions/papi.aggregateIndexes"
justica-eleitoral:
$ref: "#/definitions/papi.aggregateIndexes"
ministerios-publicos:
$ref: "#/definitions/papi.aggregateIndexes"
conselhos-de-justica:
$ref: "#/definitions/papi.aggregateIndexes"
type: object
uiapi.agency:
properties:
coletando:
Expand Down Expand Up @@ -997,7 +1016,7 @@ paths:
/v2/indice/{param}/{valor}":
get:
description: Busca as informações de índices de um grupo ou órgão específico.
operationId: GetAggregateIndexes
operationId: GetAggregateIndexesWithParams
parameters:
- description: Tipo de parâmetro.
enum:
Expand Down Expand Up @@ -1034,7 +1053,7 @@ paths:
/v2/indice/{param}/{valor}/{ano}":
get:
description: Busca as informações de índices de um grupo ou órgão específico para o ano informado.
operationId: GetAggregateIndexes
operationId: GetAggregateIndexesWithParams
parameters:
- description: Tipo de parâmetro.
enum:
Expand Down Expand Up @@ -1076,7 +1095,7 @@ paths:
/v2/indice/{param}/{valor}/{ano}/{mes}":
get:
description: Busca as informações de índices de um grupo ou órgão específico para o ano e mês informados.
operationId: GetAggregateIndexes
operationId: GetAggregateIndexesWithParams
parameters:
- description: Tipo de parâmetro.
enum:
Expand Down Expand Up @@ -1142,7 +1161,7 @@ paths:
/v2/indices/{ano}:
get:
description: Busca as informações de índices de todos os órgãos para um ano específico.
operationId: GetAggregateIndexes
operationId: GetAggregateIndexesWithParams
parameters:
- description: Ano.
type: string,
Expand All @@ -1167,7 +1186,7 @@ paths:
/v2/indices/{ano}/{mes}:
get:
description: Busca as informações de índices de todos os órgãos para um ano e mês específicos.
operationId: GetAggregateIndexes
operationId: GetAggregateIndexesWithParams
parameters:
- description: Ano.
type: string,
Expand Down
21 changes: 11 additions & 10 deletions 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-20230711162749-e2d2c0a916f0
github.com/dadosjusbr/storage v0.0.0-20231106132314-7063d34ebc2d
github.com/gocarina/gocsv v0.0.0-20220712153207-8b2118da4570
github.com/golang/mock v1.6.0
github.com/joho/godotenv v1.4.0
Expand All @@ -15,8 +15,8 @@ require (
github.com/newrelic/go-agent/v3/integrations/nrpq v1.1.1
github.com/stretchr/testify v1.8.1
github.com/swaggo/echo-swagger v1.3.5
github.com/swaggo/swag v1.8.9
google.golang.org/protobuf v1.30.0
github.com/swaggo/swag v1.16.2
google.golang.org/protobuf v1.28.1
gorm.io/driver/postgres v1.4.6
gorm.io/gorm v1.24.3
)
Expand Down Expand Up @@ -46,7 +46,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a // indirect
golang.org/x/time v0.2.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/tools v0.14.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/datatypes v1.1.0 // indirect
Expand All @@ -62,10 +62,11 @@ require (
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/net v0.16.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa // indirect
google.golang.org/grpc v1.53.0 // indirect
)
Loading
Loading