This repository provides a useful tool to validation of swagger. The main objective is validate the rules from Open Finance Brasil.
Just put in the payload the url and validators that you want to validate.
npm install
npx ts-node index.ts
POST /validation
Request payload example:
{
"url" : "https://raw.githubusercontent.com/Sensedia/draft-openapi/aggr-opendata-accounts/swagger-apis/opendata-accounts/1.0.0-beta.1.yml",
"validators" : [1,2,3,4,5,6,7]
}
{
"field": "accounts/get/responses/200/data/items/brandName",
"rule": "Campo não contem propriedade 'minLength'"
},
{
"field": "accounts/get/responses/200/data/items/brandName",
"rule": "Campo contem propriedade 'pattern' igual [\\w\\w\\s]*"
},
{
"field": "accounts/get/responses/200/data/items/companyCnpj",
"rule": "Campo não contem propriedade 'minLength'"
}