@nestjsx/crud
Advanced tools
Comparing version 4.4.5 to 4.5.0
@@ -55,4 +55,5 @@ "use strict"; | ||
this.options.auth = util_1.isObjectFull(authOptions) ? authOptions : {}; | ||
this.options.auth.property = | ||
this.options.auth.property || module_1.CrudConfigService.config.auth.property; | ||
if (util_1.isUndefined(this.options.auth.property)) { | ||
this.options.auth.property = module_1.CrudConfigService.config.auth.property; | ||
} | ||
const query = util_1.isObjectFull(this.options.query) ? this.options.query : {}; | ||
@@ -395,3 +396,3 @@ this.options.query = { ...module_1.CrudConfigService.config.query, ...query }; | ||
: this.options.params; | ||
const pathParamsMeta = swagger_helper_1.Swagger.createPathParasmMeta(params); | ||
const pathParamsMeta = swagger_helper_1.Swagger.createPathParamsMeta(params); | ||
swagger_helper_1.Swagger.setParams([...metadata, ...pathParamsMeta], this.targetProto[name]); | ||
@@ -398,0 +399,0 @@ } |
@@ -19,3 +19,3 @@ import { ParamsOptions, MergedCrudOptions } from '../interfaces'; | ||
static createResponseMeta(name: BaseRouteName, options: MergedCrudOptions, swaggerModels: any): any; | ||
static createPathParasmMeta(options: ParamsOptions): any[]; | ||
static createPathParamsMeta(options: ParamsOptions): any[]; | ||
static createQueryParamsMeta(name: BaseRouteName): ({ | ||
@@ -22,0 +22,0 @@ type: string; |
@@ -179,3 +179,3 @@ "use strict"; | ||
} | ||
static createPathParasmMeta(options) { | ||
static createPathParamsMeta(options) { | ||
return exports.swaggerConst | ||
@@ -187,2 +187,3 @@ ? util_1.objKeys(options).map((param) => ({ | ||
type: options[param].type === 'number' ? Number : String, | ||
enum: options[param].enum ? Object.values(options[param].enum) : undefined, | ||
})) | ||
@@ -189,0 +190,0 @@ : []; |
@@ -0,1 +1,2 @@ | ||
import { SwaggerEnumType } from '@nestjs/swagger/dist/types/swagger-enum.type'; | ||
import { ParamOptionType } from '@nestjsx/crud-request'; | ||
@@ -8,4 +9,5 @@ export interface ParamsOptions { | ||
type?: ParamOptionType; | ||
enum?: SwaggerEnumType; | ||
primary?: boolean; | ||
disabled?: boolean; | ||
} |
{ | ||
"name": "@nestjsx/crud", | ||
"description": "NestJs CRUD for RESTful APIs", | ||
"version": "4.4.5", | ||
"version": "4.5.0", | ||
"license": "MIT", | ||
@@ -42,4 +42,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@nestjsx/crud-request": "^4.4.5", | ||
"@nestjsx/util": "^4.4.5", | ||
"@nestjsx/crud-request": "^4.5.0", | ||
"@nestjsx/util": "^4.5.0", | ||
"deepmerge": "^3.2.0" | ||
@@ -51,3 +51,3 @@ }, | ||
}, | ||
"gitHead": "f336657c371222e7c0c24cfb6263153982e7e878" | ||
"gitHead": "7ef9744013b4b690fad667ddff089dc9135454d2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
147668
2016
Updated@nestjsx/crud-request@^4.5.0
Updated@nestjsx/util@^4.5.0