Skip to content

Bug - parameter separator logic #147

@mhamann

Description

@mhamann

I've got a situation where I'm taking an OpenAPI v3 doc, parsing it, and registering its paths in find-my-way via fastify.

However, I'm facing a problem where the OpenAPI doc has path parameters in the format {some-param}. I convert those to :some-param for find-my-way, but they're then interpreted as a parameter some + a path segment param. This is caused by this parsing logic: https://github.com/delvedor/find-my-way/blob/master/index.js#L131

I'll submit a PR, but I think that logic should ensure that the - character is followed by a : to indicate the second parameter. Otherwise, it should be assumed that it's just a continuation of the original parameter up to the next /.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions