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.

Feature Request : Swagger2Openapi provide convertObj as a separate package

See original GitHub issue

Feature Request:

convertObj() as a separate package

I am trying to create a HTML5 CustomElement which can be used in the browser to display REST documentation and also can be seamlessly integrated with other HTML documents. I depend heavily on Swagger2Openapi for this. But, the custom-element that I am building ends up becoming a large element. Upon inspection I found Swagger2Openapi depends upon certain packages that is not needed in modern-browser or modern-node environment. Such as esprima which is used by js-yaml.

Would you consider extracting out convertObj() method and provide it as a separate leaner package for modern node and browser environments?

Thanks for this amazing set of packages

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
RomanHotsiycommented, Jan 9, 2019

@MikeRalphson thanks, numbers look great! I will check it in ReDoc and let you know how it worked!

1reaction
MikeRalphsoncommented, Jan 7, 2019

I’ve added a new webpack config file webpack.converter.js (and also a webpack.validator.js) which results in a bundle of 214KB (64KB gzipped) for the converter only. I think this is a pretty good reduction, and thank you again for the suggestion.

I’d really appreciate you reporting back if it works ok in your app once released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use the swagger2openapi.convert function in ... - Snyk
To help you get started, we've selected a few swagger2openapi.convert examples ... try { converter.convert(obj,options,async function(err,options){ if (err) ...
Read more >
The orval from anymaniax - Coder Social
I want to track progress of my POST request. With Axios I would usually pass an onUploadProgress parameter to axios.post(...) . With orval...
Read more >
The oas-kit from Mermade - GithubHelp
Feature request : I would be very nice to provide context info to help locate the errors reported on validation. Line/col can work....
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