question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RangeError when using widdershins with a new OpenApi v3 spec file

See original GitHub issue
➜  api git:(swagger2) ✗ widdershins openapi.0.3.json
Compiling all doT templates...
Compiling authentication.dot to function
Compiling authentication_none.dot to function
Compiling code_http.dot to function
Compiling code_java.dot to function
Compiling code_javascript.dot to function
Compiling code_nodejs.dot to function
Compiling code_python.dot to function
Compiling code_ruby.dot to function
Compiling code_shell.dot to function
Compiling discovery.dot to function
Compiling footer.dot to function
Compiling heading_body_parameter.dot to function
Compiling heading_code_samples.dot to function
Compiling heading_example_responses.dot to function
Compiling heading_main.dot to function
Compiling parameters.dot to function
Compiling response_headers.dot to function
Compiling response_schema.dot to function
Compiling responses.dot to function
Compiling schema_header.dot to function
Compiling schema_properties.dot to function
Compiling schema_sample.dot to function
Compiling security.dot to function
/usr/local/lib/node_modules/widdershins/openapi3.js:761
            content += templates.schema_sample(data) + '\n';
                                                     ^

RangeError: Invalid string length
    at Object.convert (/usr/local/lib/node_modules/widdershins/openapi3.js:761:54)
    at Object.convert (/usr/local/lib/node_modules/widdershins/index.js:18:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/widdershins/widdershins.js:101:11)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)

Is there something wrong with my openapi.json file? I’ll attach it here: openapi.0.3.json.zip

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:23 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Nov 15, 2017

That worked! Thanks 😃

0reactions
MikeRalphsoncommented, Nov 15, 2017

Ok, I’ve tried installing on another machine and widdershins --version works ok. Can you try blowing away the node_modules folder (probably /usr/local/lib/node_modules/widdershins/node_modules/) and reinstalling?

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenAPI Specification - Version 3.0.3 - Swagger
The OpenAPI Specification defines a standard interface to RESTful APIs which allows both humans and computers to understand service capabilities without ...
Read more >
Converting an OpenAPI/Swagger file to Markdown with the ...
The simplest way to convert an OpenAPI or Swagger file to Markdown with Widdershins is to use the Widdershins command-line interface (CLI).
Read more >
api - Request body does not show up in curl example with ...
I am using widdershins to convert our openAPI3.0 yaml file to markdown. Then, I am using shins to convert the markdown file to...
Read more >
How to convert an OpenAPI document to MarkDown
Once Widdershins is installed, run the following command in the console prompt. Replace openapi.yaml with the path to your OpenAPI file in YAML ......
Read more >
OpenAPI.Tools
avantation - Generate OpenAPI 3.x specification from HAR. TypeScript, ❌, ✓, ❌. Counterfact - A new (July 2022) project that converts an OpenAPI...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found