Coder Social home page Coder Social logo

swagger-editor-helper's Introduction

Swagger Editor Helper

Hack Swagger Editor to Provide View-only Mode.

I don't have enough time and nodejs working experience to contribute to Swagger Editor itself, so I just hack it by override the response in nginx.

The community looks not that easy:

Usage

  1. Install Swagger Editor by docker:
    docker pull swaggerapi/swagger-editor
    docker run -d -p 9010:8080 swaggerapi/swagger-editor
    This will run swagger-editor on port 9010
  2. Copy nginx files to your nginx config directory:
    cp -r nginx/* /etc/nginx
  3. Change server_name and root
    vim /etc/nginx/sites-enabled/swagger.conf
    ATTENTION: use public dir as root
  4. Reload nginx
    nginx -t && nginx -s reload

HTTPS

If you want to access swagger via https, please:

  1. Prepare SSL certificate;
  2. Use swagger.https.conf:
    ln -snf ../sites-available/swagger.https.conf /etc/nginx/sites-enabled/swagger.conf
  3. Change ssl_certificate and ssl_certificate_key to use real certificate;
  4. Generate a dhparam file:
    sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096
  5. Then reload nginx:
    nginx -t && nginx -s reload

swagger-editor-helper's People

Contributors

fishdrowned avatar

Watchers

James Cloos avatar  avatar

swagger-editor-helper's Issues

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.