Where communities thrive


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

    jsdevel on v10.1.0

    (compare)

  • 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
@Goal54
Hello :)
Joe Spencer
@jsdevel
Hi
Sebastien Pereira
@seb-pereira
Hi
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
@seb-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
@seb-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
@seb-pereira
Hi,
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
@seb-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
@jsdevel
@seb-pereira that's because it's watching your files!
try making a modification
Elliot Lee
@intelliot
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
@jberger
is that timestamp correct, was the last message May 15th?
I guess this isn't the preferred communication method then
Richard Flosi
@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
@easa

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

i.e.

/**
* 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?

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