From 65ac70d6c0399c83d89f4eca2eb0888809d09e12 Mon Sep 17 00:00:00 2001 From: FelipeBaumgartel Date: Thu, 2 May 2024 09:39:01 -0300 Subject: [PATCH] fix(Gerador Dicionario de Dados): ajuste tratativa de maximum e minimum --- automation-scripts/dictionary_generator | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automation-scripts/dictionary_generator b/automation-scripts/dictionary_generator index 95a7e5d57..41cf79231 100755 --- a/automation-scripts/dictionary_generator +++ b/automation-scripts/dictionary_generator @@ -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'], @@ -229,7 +229,7 @@ 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 = { @@ -237,7 +237,7 @@ oas['paths'].each_with_index do |(path, methods)| 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']), @@ -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