# PropertyName Decorator jsonMapper schema property deprecated
Module | import { PropertyName } from "@tsed/common" |
---|---|
Source | /packages/common/src/jsonschema/decorators/propertyName.ts |
# Overview
function PropertyName(name: string): Function;
# Description
Create an alias of the propertyKey that must be used by the json mapper and json schema.
WARNING
This decorator will be removed in v6 in favor of from @tsed/schema. For v5 user, use decorator from @tsed/common or @tsed/swagger then in v6 switch to @tsed/schema.
# Example
class Model {
@Name('aliasProp')
property: string[];
}
1
2
3
4
2
3
4
- 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