원클릭으로
getting-started
Use when documenting discriminated NestJS API responses with Swagger.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when documenting discriminated NestJS API responses with Swagger.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | getting-started |
| description | Use when documenting discriminated NestJS API responses with Swagger. |
Use @wisemen/one-of when an API response has a shared shape with a type
discriminator and variant-specific meta.
import { ApiProperty } from '@nestjs/swagger'
import { OneOfMeta, OneOfMetaApiProperty, OneOfResponse, OneOfTypeApiProperty } from '@wisemen/one-of'
enum NotificationType {
DRIVER_CREATED = 'driver.created',
DRIVER_UPDATED = 'driver.updated',
}
class Notification {} // example class that anchors the type and meta
@OneOfResponse(Notification)
class NotificationResponse {
@ApiProperty({ type: String, format: 'uuid' })
uuid: string
@OneOfTypeApiProperty()
type: NotificationType
@OneOfMetaApiProperty()
meta: unknown
}
@OneOfMeta(Notification, NotificationType.DRIVER_CREATED)
class DriverCreatedNotificationMeta {
@ApiProperty({ type: String, format: 'uuid' })
driverUuid: string
@ApiProperty({type: String, format: 'date-time'})
createdAt: Date
}
@OneOfMeta(Notification, NotificationType.DRIVER_UPDATED)
class DriverUpdatedNotificationMeta {
@ApiProperty({ type: String, format: 'uuid' })
driverUuid: string
@ApiProperty({type: String, format: 'date-time'})
updatedAt: Date
}
Always pair @OneOfResponse(...) with both @OneOfTypeApiProperty() and
@OneOfMetaApiProperty(). Each @OneOfMeta(...) registers one allowed
discriminator value.
Use @OneOfApiResponse(...) for direct controller responses:
import { Controller, Get } from '@nestjs/common'
import { OneOfApiResponse } from '@wisemen/one-of'
@Controller('/notifications')
class NotificationController {
@Get()
@OneOfApiResponse(Notification)
async getNotification(): Promise<NotificationResponse> {
throw new Error('not implemented')
}
}
Use @OneOfApiExtraModels(...) and @OneOfApiProperty(...) when the one-of
response is nested inside another DTO:
import { OneOfApiExtraModels, OneOfApiProperty } from '@wisemen/one-of'
@OneOfApiExtraModels(Notification)
class GetNotificationsResponse {
@OneOfApiProperty(Notification, { isArray: true })
items: NotificationResponse[]
}
Use when scanning NestJS providers with DiscoveryService-backed utilities.
Use when working with the @wisemen/nestjs-custom-fields package — developer-defined custom fields in NestJS with TypeORM persistence and runtime validation. Covers registering the CustomFieldDefinition entity, authoring definitions with customFieldDefinition(), storing resolved values via @CustomFieldValueColumn(), exposing them through CustomFieldValueDto / @IsCustomFields(), and validating submissions with CustomFieldDefinitionsRepository + validateCustomFieldValues(). Use this whenever a task involves custom field definitions, CustomFieldValue columns, custom-field DTOs, or tenant-scoped field definitions, even if the package is not named explicitly.
Use when defining Typesense collections, collectors, and search queries in NestJS APIs.
Generate PDFs through API2PDF in NestJS. Use when converting HTML or URLs to PDFs in apis.
Use when storing and validating multilingual text in NestJS apis with TypeORM and class-validator.
Use when configuring NATS messaging, subscribers, or the simple NatsClient in NestJS applications.