Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 18 19:54
    braco commented #776
  • Jan 14 06:46

    jsdevel on v10.1.0


  • Jan 14 06:46

    jsdevel on master

    v10.1.0 (compare)

  • Jan 14 06:43
    jsdevel closed #722
  • Jan 14 06:43

    jsdevel on master

    Allow usage without implementat… (compare)

  • Jan 14 06:43
    jsdevel closed #784
  • Jan 11 13:55
    talberkoMelio commented #783
  • Jan 10 11:28
    ncodernet commented #784
  • Jan 10 11:17
    ncodernet synchronize #784
  • Jan 10 10:45
    ncodernet synchronize #784
  • Dec 28 2021 14:53
    ncodernet commented #784
  • Dec 28 2021 14:52
    ncodernet synchronize #784
  • Dec 27 2021 18:13
    jsdevel commented #784
  • Dec 27 2021 18:04

    jsdevel on master

    openapi-framework: fix typing o… (compare)

  • Dec 27 2021 18:04
    jsdevel closed #783
  • Dec 20 2021 16:56
    ncodernet commented #722
  • Dec 20 2021 16:53
    ncodernet edited #784
  • Dec 20 2021 16:53
    ncodernet synchronize #784
  • Dec 20 2021 16:13
    ncodernet commented #722
  • Dec 20 2021 16:10
    ncodernet opened #784
Benjamin GARDIEN
Hello :)
Joe Spencer
Sebastien Pereira
I am trying to get the swagger UI working with express-open-api
could not find a sample that illustrates how to do this
Sebastien Pereira

So I tried using the module swagger-ui-express

    const jsyaml = require('js-yaml');
    const swaggerUi = require('swagger-ui-express');
    const apiDoc = fs.readFileSync(path.resolve(__dirname, 'spec/rest.yaml'), 'utf8');
    app.use('/swagger-ui', swaggerUi.serve, swaggerUi.setup(apiDoc));

Swagger ui displays, but displays the error "Failed to load API definition"

Does anyone managed to successfully display swagger ui with express-openapi?
Sebastien Pereira
found it ;)
Solution simply was to point to the spec...
    const swaggerUi = require('swagger-ui-express');
    app.use('/swagger-ui', swaggerUi.serve, swaggerUi.setup(null, {
        swaggerUrl: '/api/v1/api-spec'
Sebastien Pereira
Openapi spec allows to override servers at path item and operation objects level. It does not seem to be supported by express-open-api.
Sebastien Pereira
Trying to run test as documented in README, but it hangs forever on 0 passing (0ms)
open-api[master]$ ./bin/test packages/express-openapi
+ export PATH=[…]
+ PATH=[…]
+ dir=packages/express-openapi
+ [[ -n packages/express-openapi ]]
+ shift
+ test_package packages/express-openapi test-watch
+ pushd packages/express-openapi
+ shift
+ npm i

> express-openapi@4.5.0 prepare […]/open-api/packages/express-openapi
> tsc

audited 122 packages in 2.633s
found 1 moderate severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
+ npm run test-watch

> express-openapi@4.5.0 test-watch […]/open-api/packages/express-openapi
> tsc && mocha --watch-extensions ts -w

  0 passing (0ms)
Any idea what's going wrong?
Joe Spencer
@seb-pereira that's because it's watching your files!
try making a modification
Elliot Lee
Hey! I'm trying to understand how express-openapi is meant to be used. Let's say I've defined my paths in separate files, setting GET.apiDoc etc. How can I open my API spec in SwaggerHub, or generate documentation from it? Is there a way to "export" my spec to a json or yaml file?
For example, take the Getting Started example: https://github.com/kogosoftwarellc/open-api/tree/master/packages/express-openapi#getting-started - how do I actually get a spec that I can test out with the Swagger UI?
Joel Berger
is that timestamp correct, was the last message May 15th?
I guess this isn't the preferred communication method then
Richard Flosi
Has anyone used express-openapi in a serverless environment? I’m looking into using it with Netlify Functions, but not sure running an express app will introduce overhead in the functions or if there is a way to reduce that overhead.
Eisa Nodehi

Hi everyone.
Is there any npm package to make an API doc from the jsDoc comments?


* get a user from the application
router.get('/user', (req, res) => { res.json(db.user(req.params.id)) })

To be testable and have API doc?

good morning
using express-openapi how I can define the ServiceName different from the "default"?