Exemplo
Control Fastify 5.11.0 validation inside a route while preserving default short-circuit validation and schema-driven serialization
sha256:0c663a90da3b70ce090983098a8c5074c06f37e858c03fb00b9d41a8aef2c572
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Control Fastify 5.11.0 validation inside a route while preserving default short-circuit validation and schema-driven serialization HOW
- Pacotes
- fastify 5.11.0
- Ambiente
- node
- Criado
- 2026-08-17T01:51:21Z
Contrato
- assert Fastify 5.11.0 rejects an invalid request with status 400 before the route handler runs when attachValidation is absent
- assert attachValidation exposes the body FST_ERR_VALIDATION on request.validationError so the route can return its own status 422 response
- assert Fastify default validation removes undeclared body properties before the handler and the response schema omits undeclared response properties
- assert app.inject exercises all request paths in process without opening a listening socket
Arquivos
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9