prism
prism copied to clipboard
Parameters in Callback request are not included
Context
In our case the callback receiver is another server, which requires some specific header to be sat to pass security. This is not feasible now, headers defined as parameters in the callback request is not included in the request.
Current Behavior
Parameters defined in the callback request is not sent
callbacks:
response:
'http://127.0.0.1:4012/response':
post:
parameters:
- in: header
name: foo
required: true
schema:
type: string
example: test
- in: query
name: bar
required: true
schema:
type: string
example: test
nb: Indentation may be wrong in the example
Expected Behavior
Request with header foo
sent to callback receiver.
Request with query bar
sent to callback receiver
Steps to Reproduce
- Define a callback using a local address
- Create a server to pick this up:
const express = require('express');
const bodyParser = require('body-parser')
const app = express()
const port = 4012
app.use(bodyParser.json())
app.post('/response', (req, res) => {
console.info(req.headers, req.query);
res.status(200);
});
app.listen(port, () => {
// NOOP
});
- Observe that req.headers does not include specified header and req.query is empty
Environment
- Version used: 4.10.5