lf-achyutpkl / swagger-3.0

Swagger API Documentation. Demo:

Home Page:https://lf-achyutpkl.github.io/swagger-3.0/swagger-ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swagger 3.0.0

API documentation tools

Swagger 3.0.0 is based on OpenApi Specification.

Available Tools

  • Swagger Editor: Clean and efficient open source editor for designing, describing and documenting API

  • Swagger Codegen: Generate server stub and client sdk from swagger specifications.

  • Swagger UI: Generate visual documentation of API from swagger specifications.

Getting Started

  1. Install Swagger Editor

    Try web version of swagger editor first: swagger editor online

    • Node JS must be installed before installing Swagger Editor.
    • Download latest release of swagger editor from it's github repo.
    • Deploy swagger-editor folder using any http server i.e
          python -m SimpleHTTPServer
      OR

      Installation using http-server

          npm install -g http-server
          https://github.com/swagger-api/swagger-editor/archive/v3.1.7.zip
          unzip swagger-editor.zip
          http-server swagger-editor
  2. Writing API Specification
    Learn writing your first API specification from it's official docs.
    You can try it even from web version of swagger editor.

  3. Swagger UI

    • Go to the GitHub repository of the Swagger UI project
    • Clone or download the zip file of the repository
    • Go to the folder containing the Swagger UI project in your local machine
    • Open the dist folder
    • Run the dist/index.html file on a browser or place the dist folder inside your server.
  4. Changing default API specification
    By default, you can see Petstore API docs. To change it to your API specification follow these steps.

    • In general, to do so, you would need to pass a constructor URL of the specification you wish to make as the default.
          window.swaggerUi = new SwaggerUi({
              url: 'https://raw.githubusercontent.com/lf-achyutpkl/swagger-3.0/master/api.yaml'
          });

About

Swagger API Documentation. Demo:

https://lf-achyutpkl.github.io/swagger-3.0/swagger-ui/