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

fix: update cnpj doc #509

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

fix: update cnpj doc #509

wants to merge 8 commits into from

Conversation

vhs94
Copy link

@vhs94 vhs94 commented Aug 19, 2023

update docs de acordo com o response do endpoint abaixo:

@vercel
Copy link

vercel bot commented Aug 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
brasilapi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 2, 2023 9:04am

RodriAndreotti
RodriAndreotti previously approved these changes Aug 19, 2023
@vhs94 vhs94 marked this pull request as ready for review August 19, 2023 17:41
@vhs94 vhs94 marked this pull request as draft August 19, 2023 18:38
@vhs94 vhs94 marked this pull request as ready for review August 19, 2023 18:38
@vhs94
Copy link
Author

vhs94 commented Aug 19, 2023

@RodriAndreotti pronto pra review

@BrasilAPI BrasilAPI deleted a comment from vhs94 Aug 19, 2023
Copy link
Collaborator

@RodriAndreotti RodriAndreotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notei que algumas propriedades foram removidas da documentação, estas propriedades não são mais retornadas no get da api?

PS.: Acho que apaguei um comentário seu por acidente... rs
Mals!

pages/docs/doc/cnpj.json Show resolved Hide resolved
RodriAndreotti
RodriAndreotti previously approved these changes Aug 21, 2023
@vhs94
Copy link
Author

vhs94 commented Aug 22, 2023

@RodriAndreotti deu http 500 num E2E dentro do tests/fipe-v1.test.js . Consegue dar um re-run?

@RodriAndreotti
Copy link
Collaborator

@RodriAndreotti deu http 500 num E2E dentro do tests/fipe-v1.test.js . Consegue dar um re-run?

Infelizmente não consigo, tenta fazer um amend no PR, teoricamente ele vai rodar de novo.

@vhs94 vhs94 changed the title fix: update cnpj docs fix: update cnpj doc Aug 22, 2023
@RodriAndreotti
Copy link
Collaborator

Aparentemente o retorno de um dos endpoints mudou, acho que vamos precisar corrigir o teste correspondente.

@RodriAndreotti
Copy link
Collaborator

@vhs94 Conseguiria ajustar esse teste para o PR passar?
image

Acredito que podemos substituir esse "numero_ato": "272", para "numero_ato": expect.any(String),

Desta forma, se o retorno mudar novamente, a gente mantém o teste funcionando.

"opcao_pelo_mei": {
"type": "boolean"
},
"data_opcao_pelo_mei": {
"type": "string",
"format": "date"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa data pode ser null

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LorhanSohaky fiquei com duvida nesse cara ai, posso colocar type date e format nullable?

 "type": "date",
 "format": "nullable"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vhs94 Acho que neste caso daria para usar um anyOf, semelhante ao sugerido nesta resposta aqui:
https://stackoverflow.com/a/70658334
O que acham?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confesso que não conheço muito, mas talvez seja possível colocar quais são os campos obrigatórios. Mas a sugestão do Rodrigo parece melhor

image

},
"data_exclusao_do_mei": {
"type": "string",
"format": "date"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa data pode ser null

@sonarcloud
Copy link

sonarcloud bot commented Sep 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@vhs94
Copy link
Author

vhs94 commented Sep 2, 2023

expect.any(String)

@vhs94 Conseguiria ajustar esse teste para o PR passar? image

Acredito que podemos substituir esse "numero_ato": "272", para "numero_ato": expect.any(String),

Desta forma, se o retorno mudar novamente, a gente mantém o teste funcionando.

feito man @RodriAndreotti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants