Giter Club home page Giter Club logo

Comments (4)

wesleytodd avatar wesleytodd commented on July 16, 2024

Is this with the newest version? I know there were some changes just recently in some of this code and just want to make sure we debug the right combo of things. I also assume you are on the latest express 5 prerelease?

from express-openapi.

fredrikkarlsson-pervanovo avatar fredrikkarlsson-pervanovo commented on July 16, 2024

No, sorry! I was trying to update versions and tried different combos.

This is the stack trace for

  • "@wesleytodd/openapi": "^0.3.0"
  • "express": "^5.0.0-beta.1"
TypeError: split(...).join is not a function
    at ...\node_modules\@wesleytodd\openapi\lib\generate-doc.js:76:47
    at Array.forEach (<anonymous>)
    at iterateStack (...\node_modules\@wesleytodd\openapi\lib\generate-doc.js:74:24)
    at ...\node_modules\@wesleytodd\openapi\lib\generate-doc.js:17:5
    at Array.forEach (<anonymous>)
    at generateDocument (...\node_modules\@wesleytodd\openapi\lib\generate-doc.js:16:26)
    at OpenApiMiddleware (...\node_modules\@wesleytodd\openapi\index.js:42:29)
    at Layer.handleRequest (...\node_modules\express\node_modules\router\lib\layer.js:101:15)
    at trimPrefix (...\node_modules\express\node_modules\router\index.js:330:13)
    at ...\node_modules\express\node_modules\router\index.js:291:7

The input to split is /^(?:\/(?=$))?/i and it ends up in the last return case which is a string.

from express-openapi.

wesleytodd avatar wesleytodd commented on July 16, 2024

Ah ok, yeah maybe we should put together a test to cover express@5. I should have thought of this before, it is a breaking change for a reason lol. Also would be happy to see a PR fixing this on the latest if you want, OSS is a team sport!

from express-openapi.

wesleytodd avatar wesleytodd commented on July 16, 2024

I think this is fixed. Please re open if you are on latest and it is still an issue. We added tests and everything to do multiple express major testing.

from express-openapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.