Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Nov 13:42
Immutable release. Only release title and notes can be modified.
6247883

seampact 1.1.0

seampact 1.1.0 adds two server targets, API Platform and Next.js, an axios client, and app input rules on the Node and PHP servers. Every package, in every ecosystem, moves to 1.1.0. Your contracts need no change.

New targets

  • A new seampact/api-platform target generates API Platform 5 resources, operations and processors for a contract, served through the Symfony boundary. Every reply goes through the boundary, and the exceptions of API Platform's security map to the api's errors. See the API Platform guide.
  • The API Platform target writes JSON-LD items and Hydra collections with the @id of each resource, and @seampact/pack-api-platform answers a failed validation with API Platform's 422 violations body.
  • A new @seampact/codegen-nextjs target generates a route handler per api for a Next.js 16 catch-all route file, with the contract's access, validation and reply checks around your handlers. See the Next.js guide.
  • A new @seampact/codegen-axios target generates the typed client over your own axios instance, and the React, Vue and Angular targets run over it unchanged. See the axios client.
  • Both server targets pass the shared http suite in CI, Next.js on a real next build and next start app, and the compatibility matrix lists them as tested.

App input rules

Your own checks now run after the contract's checks, written in your validator library, and a failure answers the contract's schema-invalid error with app.<name> issues (ADR 0028):

  • Express, Fastify and Hono take typed inputRules beside hooks, with zod, yup or Ajv rules; Next.js takes them in routeHandler, as Hono does.
  • NestJS and AdonisJS take them in forRoot and registerRoutes, with class-validator, VineJS, zod or yup rules.
  • Laravel takes rules in Laravel's validation syntax, and Symfony takes Symfony constraints.
  • The shared http suite has an input-rules case; the servers without input rules yet skip it by name.

Python, Spring Boot and API Platform get input rules in 1.2.0. Until then, API Platform refuses a tagged input rules service at cache:warmup with input.rules.unsupported.

Examples

Three runnable apps, each generated from one contract and kept green by CI: NestJS and React, Laravel and Vue, and a full-stack Next.js app.

Registry pages

  • Every published package's npm, Packagist and PyPI page opens with a one-sentence description, keywords, an install line and a link to its guide; Maven Central and the Gradle Plugin Portal get the same descriptions and tags.
  • The Gradle Plugin Portal approved io.github.jubasse.seampact: Gradle builds load the plugin from the portal.
  • The npm packages are published through npm trusted publishing, with no token.