@amplication/plugin-swagger-apibody

1.3.3 • Public • Published

@amplication/plugin-swagger-apibody

NPM Downloads

Add Description of Routes and Entity properties to the REST-API Documentation.

@common.Post()
  @swagger.ApiCreatedResponse({ type: User })
  @swagger.ApiForbiddenResponse({ type: errors.ForbiddenException })
  @swagger.ApiBody({
    type: UserCreateInput,
  }) /// add this line to every post and update controller
  async create(@common.Body() data: UserCreateInput): Promise<User> {

Purpose

The plugin adds the details of the type of the body to the Create and Update methods in each controller.

Configuration

no configuration required

Scripts

build

Running npm run build will bundle your plugin with Webpack for production.

Usage

add this plugin to the generated code to get extra information on your documentation.

Readme

Keywords

none

Package Sidebar

Install

npm i @amplication/plugin-swagger-apibody

Weekly Downloads

38,341

Version

1.3.3

License

Apache-2.0

Unpacked Size

1.82 MB

Total Files

6

Last publish

Collaborators

  • amitbarletz
  • amplication-bot
  • barshimi
  • levivannoort
  • morhag
  • mulygottlieb
  • overbit
  • yuvalhazaz