Skip to content

Commit

Permalink
remove uneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Dec 21, 2019
1 parent 498b876 commit a6885a8
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/middlewares/openapi.request.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,27 +453,7 @@ export class RequestValidator {
: parameterSchema.type === 'object'
? Object.keys(parameterSchema.properties)
: [];
// const properties = hasXOf
// ? ['allOf', 'oneOf', 'anyOf'].reduce((acc, key) => {
// if (!parameter.schema.hasOwnProperty(key)) {
// return acc;
// } else {
// const found_properties = parameter.schema[key].reduce(
// (acc2, obj) => {
// return obj.type === 'object'
// ? acc2.concat(...Object.keys(obj.properties))
// : acc2;
// },
// [],
// );
// return found_properties.length > 0
// ? acc.concat(...found_properties)
// : acc;
// }
// }, [])
// : parameterSchema.type === 'object'
// ? Object.keys(parameterSchema.properties)
// : [];

parseObjectExplode.push({ reqField, name, properties });
}

Expand Down

0 comments on commit a6885a8

Please sign in to comment.