{{ message }}
Repository navigation
feat(banks): adiciona busca por nome, código ou ISPB em /banks/v1 - #927
Open
Gabriel-Richard-dev wants to merge 2 commits into
Open
Gabriel-Richard-dev wants to merge 2 commits into
Gabriel-Richard-dev wants to merge 2 commits into
Conversation
Aceita o query param opcional `search` em GET /api/banks/v1, filtrando por trecho de name/fullName (sem diferenciar maiúsculas e acentos) ou, para termos numéricos, por code (igualdade) e ispb (trecho). Sem o parâmetro, a resposta continua idêntica. Closes BrasilAPI#282
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




📋 Descrição
Adiciona o query param opcional
searchemGET /api/banks/v1, para buscar bancos por trecho do nome, código bancário ou ISPB:nameefullName(sem diferenciar maiúsculas e acentos). Ex.:?search=pagamentoscode(igualdade) eispb(trecho). Ex.:?search=260,?search=18236120200com[]searchvazio, só espaços, repetido (?search=a&search=b) ou com mais de 100 caracteres →400(BANK_SEARCH_INVALID)Sem o parâmetro, a resposta é idêntica à atual.
Retoma a ideia do #285 (fechado por inatividade), seguindo o feedback da revisão de lá: os testes não fixam a lista de bancos, só validam que cada resultado bate com o termo buscado.
🎯 Tipo de Mudança
📚 Checklist de Documentação
/pages/docs/doc/(bank.json: parâmetrosearche resposta400comErrorMessage)🧪 Checklist de Testes
tests/banks-v1.test.js)npm test -- tests/banks-v1.test.js: 14/14)💻 Checklist de Código
🚀 Checklist de Performance e Custos
getBanksData)🔍 Como Testar
npm run devcurl 'http://localhost:3000/api/banks/v1?search=pagamentos'curl 'http://localhost:3000/api/banks/v1?search=260'curl -i 'http://localhost:3000/api/banks/v1?search='→ 400📎 Issues Relacionadas
Closes #282