Skip to content

Using Express@5 causes error with fast_slash #70

Open

Description

@halfstack-dev

Using this library in it's most basic form with express@5 causes the follwing error to be thrown:

TypeError: Cannot read properties of undefined (reading 'fast_slash')
at split (@wesleytodd/openapi/lib/generate-doc.js:127:20)

package version: 1.1.0
express version: 5.0.1

Activity

  1. halfstack-dev commented on Mar 14, 2025

    @halfstack-dev
    Author

    Just saw it mentioned here as well:

    #64 (comment)

    And @... unfortunately changes to path-to-regexp broke this lib in both express@>=4.20.0 and express@5. I am going to be working on fixes for that soon.

  2. enov commented on Aug 27, 2025

    @enov
    Collaborator

    There is some work happening to expose a new router.getRoutes() API in pillarjs/router
    It would simplify or allow us to get rid of iterateStack in generate-doc.js. That would be in addition to getting rid of the functions split and processComplexMatch as Express 5 does not support regex routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions