Skip to content

v1.6.0

Choose a tag to compare

@Fcmam5 Fcmam5 released this 04 May 09:12
· 32 commits to develop since this release
Immutable release. Only release title and notes can be modified.

What's Changed

This release simplifies the OpenAPI schema by removing the non-standard invalid-params extension member and vendor-specific, aligning the documentation with RFC 9457. It also introduces a new helper for registering a named ProblemDetails model in Swagger UI and adds formatting checks to CI.

Features

  • addProblemDetailsSchema helper — registers the canonical ProblemDetails schema under components.schemas.ProblemDetails in an OpenAPI document, making it visible as a named model in Swagger UI:

    import { addProblemDetailsSchema } from 'nest-problem-details-filter/swagger';
    
    const document = SwaggerModule.createDocument(app, builder);
    addProblemDetailsSchema(document);

    This replaces the manual pattern of mutating document.components.schemas and is now documented in README.md, docs/usage.md, and docs/openapi.md.

Changes

  • Schema cleanup — removed the invalid-params extension member from PROBLEM_DETAILS_SCHEMA and all documentation. This field appeared only in an RFC 7807 example and was not standardized in RFC 9457. The library never emitted it, and the schema now documents only the code and errors extension members (errors is accepted but not emitted by default).
  • Documentation consistency — fixed contradictions in docs/openapi.md where the notes incorrectly stated the library emits errors. All references now consistently state that errors is accepted by the schema but not emitted by default.
  • CI formatting check — added npm run format:check to both main.yml and release.yml pipelines. The format script was also extended to cover both src and tests directories for consistency with the lint script.

Full Changelog: v1.5.0...v1.6.0