Skip to content

Format municipal service code in ADN request paths - #90

Merged
vitormattos merged 1 commit into
mainfrom
fix/format-municipal-service-code-path
Oct 7, 2026
Merged

vitormattos merged 1 commit into
mainfrom
fix/format-municipal-service-code-path

Conversation

@vitormattos

Copy link
Copy Markdown
Member

The ADN municipal-parameters API documentation and official examples use the 9-digit service code formatted in the path as XX.XX.XX.XXX (for example 07.02.01.001).

The client previously validated the 9 digits but stripped punctuation and sent 010101000, which the real ADN endpoint rejects with:

Chamada mal formada. O código do serviço deve ser composto por nove dígitos.

This PR keeps digit-only normalization/validation at the API boundary, but serializes the path segment in the official dotted format.

Regression tests now assert:

  • 010101000 -> 01.01.01.000
  • dotted input stays equivalent after normalization.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit 4ca1730 into main Oct 7, 2026
11 checks passed
@vitormattos
vitormattos deleted the fix/format-municipal-service-code-path branch October 7, 2026 00:21
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.

1 participant