Releases: OpenReplyDE/nestjs-express-openapi
🐛 0.4.1 fix import of ContentType class
0.4.0 Export Type NestjsOpenapiMiddlewareOptions
- 0.4.0 export type NestjsOpenapiMiddlewareOptions
:sparkles: 0.3.0 allow for x-extensible-enum in API specs
- ✨ 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
- 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
📝 0.1.6 fix serveApiDocs and serveSwaggerUi documentation
:memo: 0.1.5 add comment on health check paths
📝 0.1.5 add comment on health check paths
🐛 0.1.4 allow to omit jwtVerifier options
🐛 0.1.4 allow to omit jwtVerifier options
0.1.3
0.1.2
0.1.1 Add Installation Instructions
:memo: add installation instructions