Repository navigation
v0.9.0
Minor Changes
-
New
options.overlayapplies an OpenAPI Overlay 1.0 document to the generated spec: the overlay object, or the path of a JSON or YAML file relative to the config file. Actions run in order;updatemerges into the objects its JSONPath target selects or appends to arrays, andremovedeletes them. An action whose target matches nothing fails generation and names the action, or only warns withoverlayUnmatchedTarget: 'warn'. The overlay'soverlay,infoandactionsfields are checked before anything is applied. -
New
options.operationExtensionsaddsx-extensions to each operation from a function. It gets the operation's HTTP method, final path, operationId, controller, method, module andfiles.entry, plus the decorators on the method and the controller with their arguments evaluated statically, so@Roles('admin')can becomex-roles: ['admin']. Keys set with@ApiExtensionwin over the returned ones, and a name without thex-prefix fails generation. TheOperationContext,OperationExtensionsandOperationExtensionsHooktypes are exported.
Patch Changes
- When
@ApiExtensionsets the same key twice on one method or controller, the topmost decorator now wins, as in @nestjs/swagger, which applies it last.