Giter VIP home page Giter VIP logo

swagger-enhance's Introduction

swagger-enhance's People

Contributors

shawnbot avatar

Stargazers

 avatar  avatar

swagger-enhance's Issues

Trying to enhance petstore.swagger.io but fails

I've tried swagger-enhance with the petstore example from http://petstore.swagger.io/v2/swagger.json but it fails:

If I use the url variant I get this error:

C:\Users\schp>swagger-enhance %API_URL% > mm-enhanced.json
C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\async\lib\async.js:54
        if (arr.map) {
               ^
TypeError: Cannot read property 'map' of undefined
    at _map (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\async\lib\async.js:54:16)
    at _asyncMap (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\async\lib\async.js:237:15)
    at Object.map (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\async\lib\async.js:219:23)
    at enhance (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\index.js:15:9)
    at Request._callback (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\index.js:40:5)
    at Request.self.callback (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\request\request.js:344:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\request\request.js:1239:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\request\request.js:1187:12)

If I download the json and use the file variant I get this error:

C:\Users\schp>swagger-enhance --file --base %API_URL% > mmenhanced.json
C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\rw\lib\rw\read-file.js:7
    if (error) return callback(error);
                      ^
TypeError: undefined is not a function
    at C:\Users\schp\AppData\Roaming\npm\node_modules\swagger-enhance\node_modules\rw\lib\rw\read-file.js:7:23
    at FSReqWrap.oncomplete (fs.js:99:15)

Is this a user error on my side or a different problem?

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.