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

Aggr financings #723

Closed
wants to merge 5 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/create-pull-requet-to-aggr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Verifica se o URL do repositório de origem contém o nome do repositório original
if [[ "$origin_url" == *"https://github.com/Sensedia/draft-openapi"* ]]; then
git fetch --all
features=$(git branch -r | grep -i "aggr" | sed -e "s/.*origin\///g; /merge/d" | tr "\n" " ")
features=$(git branch -r | grep -i "origin/aggr" | sed -e "s/.*origin\///g; /merge/d" | tr "\n" " ")
eval "featureArray=($features)"

# create merge branches
Expand Down
14 changes: 7 additions & 7 deletions automation-scripts/dictionary_generator
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ end

# Write headers and rows on given filename
def generate_csv(filename, headers, rows)
CSV.open(filename,'w', {:col_sep => ";"}) do |file|
CSV.open(filename, 'w', col_sep: ";") do |file|
file << headers.values
rows.each do |row|
file << row.values
Expand Down 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,15 +247,15 @@ 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
end
end
end

version = "v" + oas['info']['version'].split(/\./, 3).first
version = "v" + oas['info']['version'].split(/-/, 2).first
filename = output_path + spec['operationId'] + "_" + version + '.csv'
puts ' ├── Writing file ' + filename
if $isRegulatoryRequiredAPI
Expand All @@ -268,4 +268,4 @@ oas['paths'].each_with_index do |(path, methods)|
end

puts '> Files generated!'
exit 0
exit 0
14 changes: 13 additions & 1 deletion swagger-apis/financings/2.4.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ components:
pattern: '[\w\W\s]*'
maxLength: 2048
meta:
$ref: '#/components/schemas/Meta'
$ref: '#/components/schemas/MetaError'
ResponseFinancingsContractList:
type: object
required:
Expand Down Expand Up @@ -1321,6 +1321,18 @@ components:
maxLength: 20
format: date-time
example: '2021-05-21T08:30:00Z'
MetaError:
type: object
description: Meta informações referente à API requisitada.
required:
- requestDateTime
properties:
requestDateTime:
description: 'Data e hora da consulta, conforme especificação RFC-3339, formato UTC.'
type: string
maxLength: 20
format: date-time
example: '2021-05-21T08:30:00Z'
Links:
type: object
description: Referências para outros recusos da API requisitada.
Expand Down
Loading