Git Product home page Git Product logo

Comments (3)

soyuka avatar soyuka commented on July 29, 2024

Looks like Object.keys(response.paths) can't be called, the response doesn't have any paths?

I'd like to reproduce if you could check what data is given to the handleJson file maybe we can have more informations.

from api-doc-parser.

jfoliveira avatar jfoliveira commented on July 29, 2024

@soyuka I could reproduce it using the API-Platform demo when specifying --format openapi3:

npx @api-platform/client-generator https://demo.api-platform.com/docs.json src/ --resource Book --format openapi3

Exception:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at /Users/{myuser}/.npm/_npx/10629/lib/node_modules/@api-platform/client-generator/node_modules/@api-platform/api-doc-parser/lib/openapi3/handleJson.js:19:34
    at Array.map (<anonymous>)
    at Object.default_1 [as default] (/Users/{myuser}/.npm/_npx/10629/lib/node_modules/@api-platform/client-generator/node_modules/@api-platform/api-doc-parser/lib/openapi3/handleJson.js:16:27)
    at /Users/{myuser}/.npm/_npx/10629/lib/node_modules/@api-platform/client-generator/node_modules/@api-platform/api-doc-parser/lib/openapi3/parseOpenApi3Documentation.js:12:45

I tried but couldn't find a fix though.

from api-doc-parser.

soyuka avatar soyuka commented on July 29, 2024

Can you check the json response and if it has some paths? Maybe that a proper fix would be to throw a better error?

from api-doc-parser.

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.