Git Product home page Git Product logo

apidoc's Introduction

Introduction

ApiDoc is a template made in HTML, PHP and Jquery to assist with PHP REST API documentation.

Installation

Copy the link below to your command line to download the latest version. ApiDoc does not need to be installed on your machine, just clone the file and unzip it to the server folder.

$ git clone -b 2.0.0-stable --single-branch https://github.com/brennoDuarte/ApiDoc.git ApiDoc-v2.0.0-stable

Make sure JavaScript is enabled in your browser. You can turn on dark mode, but it will turn off as soon as you reload the page.

Configure

The json files are in the "json" folder.

You can edit the file "config.json" as follows:

  • "appName": your project name,
  • "version": your project version,
  • "description": a brief description of your api,
  • "language": the language in which your API was made,
  • "protocol": your api's protocol, HTTP or HTTPS,

To edit default routes, change the "router.json" file. The urls session is subdivided into:

  • "pathName": name main route from your endpoint,
  • "id": modal id that will be displayed by clicking the route button. Remember to edit a different id for each endpoint, otherwise the id will not be displayed,
  • "pathGet/GetId/Post/Put/Delete": endpoints of your API,
  • "descriptionGet/Post/Put/Delete": a brief description of your endpoint,
  • "link": link from your endpoint. Clicking it will open in a new tab.

To add a new path, copy from "pathName" into the "config.json" file and paste it below the other paths.

If you have multiple routes (get, post, put, delete), use a custom route. you can edit the customrouter.json file for this:

  • "customRouter": name main route from your endpoint,
  • "type": GET, POST, PUT, DELETE or other,
  • "path": endpoint of your API,
  • "description": a brief description of your endpoint,
  • "link": link from your endpoint. Clicking it will open in a new tab.

If your api does not have a certain request, change the field to null. Example:

"post": {
    "id": null,
    "pathPost": null,
    "descriptionPost": null,
    "link": null
},

Done, just open the apidoc.php file in any browse.

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.