# Example Decorator swagger schema methodDecorator classDecorator
Module | import { Example } from "@tsed/common" |
---|---|
Source | /packages/common/src/jsonschema/decorators/example.ts |
# Overview
function Example(example: any): Function;
export function Example(name: string | any, description: string): ClassDecorator;
# Description
Add a example metadata on the decorated element.
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing