Swagger Editor offline installation

前端 未结 4 621
南方客
南方客 2021-01-05 03:14

Our company is using swagger to document their API\'s, currently a couple of developers are using the online swagger editor on their PC\'s.

I want to move this piec

相关标签:
4条回答
  • 2021-01-05 03:38

    npm is not required, you can download the compiled files from the Swagger Editor repository:

    • index.html
    • dist\*

    and open index.html locally (from the file system) or put the files onto a web server in your network.

    0 讨论(0)
  • 2021-01-05 03:49

    With one command with npm/npx:

    npx swagger-editor-binary
    
    0 讨论(0)
  • 2021-01-05 03:51

    In short answer is https://swagger.io/docs/swagger-tools/#swagger-editor

    git clone https://github.com/swagger-api/swagger-editor.git
    cd swagger-editor
    npm install
    npm run build
    npm start
    

    And it will works in your Intranet OK.

    0 讨论(0)
  • 2021-01-05 03:59
    1. Download the one of the source releases from swagger-editor's github page (click releases link on the page)
    2. unzip the downloaded source release zip/tar file.
    3. cd into the extracted source dir, type 'npm install' (or if you have some npm mirror module installed, such as cnpm, use 'cnpm install' instead)
    4. Use a browser to open index.html file in the source dir. Or, follow official guide the 'Setup with http-server module from GitHub' section to serve from a local static web server.

    PS. You don't need to build the source code unless you want to contribute as written in the 'Contribute' section of the official document.

    0 讨论(0)
提交回复
热议问题