Skip to content

Commit

Permalink
Merge pull request #3919 from Sensedia/fix-gerador-dicionario-maximum
Browse files Browse the repository at this point in the history
fix(Gerador Dicionario de Dados): ajuste tratativa de maximum e minimum
  • Loading branch information
andretrindade authored May 2, 2024
2 parents 77e078b + 65ac70d commit 0131de9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions automation-scripts/dictionary_generator
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ oas['paths'].each_with_index do |(path, methods)|
headersXregulatory['COLUMN_2'] => field['name'],
headersXregulatory['COLUMN_3'] => field['description'],
headersXregulatory['COLUMN_4'] => format_type(data_type),
headersXregulatory['COLUMN_5'] => field['maxLength'],
headersXregulatory['COLUMN_5'] => field['maxLength'] ? field['maxLength'] : field['maximum'],
headersXregulatory['COLUMN_6'] => mandatory,
headersXregulatory['COLUMN_7'] => regulatoryMandatory,
headersXregulatory['COLUMN_8'] => field['pattern'],
Expand All @@ -229,15 +229,15 @@ oas['paths'].each_with_index do |(path, methods)|
headersXregulatory['COLUMN_13'] => field['nullable'] ? "Permitido" : "Não permitido",
headersXregulatory['COLUMN_14'] => field['type'],
headersXregulatory['COLUMN_15'] => field['example'],
headersXregulatory['COLUMN_16'] => field['minLength']
headersXregulatory['COLUMN_16'] => field['minLength'] ? field['minLength'] : field['minimum']
}
else
row = {
headers['COLUMN_1'] => field['path'],
headers['COLUMN_2'] => field['name'],
headers['COLUMN_3'] => field['description'],
headers['COLUMN_4'] => format_type(data_type),
headers['COLUMN_5'] => field['maxLength'],
headers['COLUMN_5'] => field['maxLength'] ? field['maxLength'] : field['maximum'],
headers['COLUMN_6'] => mandatory,
headers['COLUMN_7'] => field['pattern'],
headers['COLUMN_8'] => format_enum(field['enum']),
Expand All @@ -247,7 +247,7 @@ oas['paths'].each_with_index do |(path, methods)|
headers['COLUMN_12'] => field['nullable'] ? "Permitido" : "Não permitido",
headers['COLUMN_13'] => field['type'],
headers['COLUMN_14'] => field['example'],
headers['COLUMN_15'] => field['minLength']
headers['COLUMN_15'] => field['minLength'] ? field['minLength'] : field['minimum']
}
end
rows.push row
Expand Down

0 comments on commit 0131de9

Please sign in to comment.