Skip to content

Conflicting path param templates between ApiSpec expected by express-wrapper vs superagent-wrapper #53

@jonball4

Description

@jonball4

express-wrapper (and express) expects path params denoted as api/v1/someapi/:param/someendpoint:

router[method](httpRoute.path, handlers);

Whereas the superagent-wrapper expects paths with params denoted as api/v1/someapi/{param}/someendpoint.

path = path.replace(`{${key}}`, reqProps.params[key]);

This creates the inability to satisfy both requirements / send path params through superagent-wrapper while using io-ts-http and express-wrapper.

Example in test:

VS.
testApp.post('/test/:id', (req, res) => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions