(metadataKey: string, key: string, property: any)
| 21 | } |
| 22 | |
| 23 | function AddMetadataProperty(metadataKey: string, key: string, property: any) { |
| 24 | return (target: any, propertyKey?: string) => { |
| 25 | // Note that propertyKey can be undefined as it's an optional parameter in getMetadata. |
| 26 | let o = Reflect.getMetadata(metadataKey, target, propertyKey as string) || {}; |
| 27 | o = Object.assign({}, o); |
| 28 | o[key] = property; |
| 29 | Reflect.defineMetadata(metadataKey, o, target, propertyKey as string); |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | export function ApiInfo(info: IApiInfo | ((controller: any) => IApiInfo)): OpenApiDecorator { |
| 34 | return Reflect.metadata('api:document:info', info); |
no outgoing calls
no test coverage detected