npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mk-swagger-ui

v1.0.6

Published

Swagger UI dist generator based on OpenAPI YAML

Downloads

10

Readme

Swagger UI dist generator based on OpenAPI YAML

Overview:

This package provides several simple CLI tools which makes easier to works with Swagger/OpenAPI. One of tools has same name as the package: mk-swagger-ui. So you can use it via npx, wihout installing.

For the other tools, you would have to install this npm package first. Then, you would be able to use npx to launch those additional tools.


Run mk-swagger-ui:

  • make a new empty folder
  • place OpenAPI/Swagger YAML file there. You should have a folder with a single file, e.g. filename.yaml
  • Optionally run: npm install mk-swagger-ui
  • npx mk-swagger-ui filename.yaml

What you would get:

  • the tool would generate dist folder with static html/js files from Swagger-UI package
  • you can navigate to http://localhost:3000 to preview the Swagger-UI package
  • please view generated ./dist folder - you can deploy it to a webserver

If you installed the NPM package locally:

You would have a few additional commands, that can be run now via npx. If you did not install the package with -g option -- make sure to run npx command while being in directory where you installed the package.

  • npx get-editor - to get the Swagger Editor package from github
  • npx get-ui - to get the Swagger UI package from github
  • npx get-codegen - to get the Swagger Codegen package from github

Sum up - Results

  • The folder dist has been created with static Swagger UI files
  • Your OpenAPI YAML file has been converted to JSON format. The JSON file placed to dist folder
  • Swagger UI has been configured to use your JSON file
  • You can host your static files from the dist folder on any web server