Skip to content

Releases: OpenReplyDE/nestjs-express-openapi

🐛 0.4.1 fix import of ContentType class

24 Nov 13:33

Choose a tag to compare

  • 🐛 0.4.1 fix import of ContentType class

0.4.0 Export Type NestjsOpenapiMiddlewareOptions

24 Nov 08:17

Choose a tag to compare

  • 0.4.0 export type NestjsOpenapiMiddlewareOptions

:sparkles: 0.3.0 allow for x-extensible-enum in API specs

05 Sep 11:13

Choose a tag to compare

  • ✨ 0.3.0 allow for x-extensible-enum in API specs

This release allows you to use x-extensible-enum in API specifications such that you can be compliant with Zalando's RESTful API Guidelines.

0.2.0 add types for request/response features

14 Aug 12:02

Choose a tag to compare

  • 0.2.0 add types for request/response features

New Features

You can now import your request/response feature types from the generated openapi.ts:

import type {
  PathParameters,
  QueryParameters,
  RequestBody,
  RequestHeaders,
  ResponseBody,
} from "../generated/openapi.js";

And use them without the first paths type parameter that was required previously. See these examples:

This type will give you the query parameters that are specified at GET /greetings:

type GetDatesQuery = QueryParameters<{ method: 'get'; path: '/greetings' }>;
/* => type GetDatesQuery = {
    name?: string;
} | undefined */

This type will give you the path parameters that are specified at GET /dates/{time}:

type GetDatesParams = PathParameters<{ method: 'get'; path: '/dates/{time}' }>;
/* => type GetDatesParams = {
    time: "today" | "yesterday";
} */

Note that the RequestBody requires an additional contentType property:
This type will give you the request body type that is specified at POST /authentications for the application/x.credentials.v1+json request-content-type:

type AuthenticationBody = RequestBody<{ method: 'post'; path: '/authentications'; contentType: 'application/x.credentials.v1+json' }>;
/* => type AuthenticationBody = {
    username: string;
    password: string;
} */

Please also note that ResponseBody requires a status property in the second type argument:

type TokenResponse = ResponseBody<{ method: 'post'; path: '/authentications'; status: 200 } >;
/* => type TokenResponse = {
    access_token: string;
    scheme: "bearer";
} */

:memo: 0.1.6 fix serveApiDocs and serveSwaggerUi documentation

11 Jul 10:38

Choose a tag to compare

📝 0.1.6 fix serveApiDocs and serveSwaggerUi documentation

:memo: 0.1.5 add comment on health check paths

11 Jul 09:10

Choose a tag to compare

📝 0.1.5 add comment on health check paths

🐛 0.1.4 allow to omit jwtVerifier options

11 Jul 09:02

Choose a tag to compare

🐛 0.1.4 allow to omit jwtVerifier options

0.1.3

02 Jul 06:04

Choose a tag to compare

  • 🎨 0.1.3 format code

0.1.2

02 Jul 05:59

Choose a tag to compare

  • 🐛 0.1.2 allow to not set jwtVerifier options

0.1.1 Add Installation Instructions

05 Jun 05:50

Choose a tag to compare

:memo: add installation instructions