Closed hankconn closed 4 years ago
I think we could do this. I don't think I fully understand the request though. Can you give me a more complete code example of how you'd like it to work?
I created a PR to demonstrate the idea: https://github.com/byu-oit/openapi-enforcer/pull/77
Sorry I haven't acted on this yet. It's been two full days. I hope to take a look tomorrow morning.
Thanks for PR. That made it easier to understand what was being asked. I added documentation and tests and pushed to NPM as version 1.10.4
.
In our implementation (nest.js / express), the query parameters are in a "query" property on the Request object -- not in the "path" property, which is what enforcer is checking:
const [ pathString, query ] = request.path.split('?');
Can support for a Request.query property be added? It is an object of key-value pairs with the parameter name/value.