File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1312,6 +1312,14 @@ let QUERYPARAM = 'query',
13121312 const hasProps = _ . isObject ( schemaProps ) && ! _ . isEmpty ( schemaProps ) ;
13131313 if ( hasProps ) {
13141314 filteredValue = _ . pick ( paramValue , Object . keys ( schemaProps ) ) ;
1315+ // Strip each declared property's own schema keys from its value before extraction
1316+ _ . forEach ( filteredValue , ( propValue , propName ) => {
1317+ if ( _ . isObject ( propValue ) ) {
1318+ // taking only the keys that are declared in the schema
1319+ const propSchemaKeys = Object . keys ( _ . get ( schemaProps , propName , { } ) ) ;
1320+ filteredValue [ propName ] = _ . omit ( propValue , propSchemaKeys ) ;
1321+ }
1322+ } ) ;
13151323 }
13161324 else {
13171325 const schemaKeys = Object . keys ( _ . get ( param , 'schema' , { } ) ) ;
You can’t perform that action at this time.
0 commit comments