Giter VIP home page Giter VIP logo

gradle-apidoc-plugin's Introduction

gradle-apidoc-plugin

This plugin can be used to generate REST documentation that can be served by compiled application.

Requirements

  • nodejs
  • apidocjs
    • global installation
      • npm install apidoc -g (you may need sudo)
    • local installation
      • in your project folder type npm install apidoc (this will create node_modules folder with all dependencies)

Tasks

apidoc

Generates REST API documentation using apidocjs.

apidocGenConfig

Generates minimal apidoc.json configuation file from project variables (name, description, version).

Configuration

Listening below illustrates how can you use all available options. If you agree with defaults, you can omit whole apidoc section.

plugins {
    id "com.simplid.gradle.apidoc" version "0.1.0"
}
 
apidoc {
    exec "apidoc"
    inputDir "src/main/java/some/package/controllers"
    outputDir "$project.buildDir/resources/main/doc"
    include ".groovy", ".java"
    include ".kt"
    exclude ".scala"
    exclude ".js"
    template "/path/to/template"
    configFile "custom/config/apidoc.json"
}

Options:

exec

default: "apidoc" or "apidoc.cmd"

Full path or name on $path to apidoc executable. If not specified, plugin will check if local copy of apidoc is avaible inside node_modules/apidoc/bin/ folder in your project, otherwise it will try to execute apidoc from $path.

inputDir

default: "src/main"

Should point to folder where you store all your annotated files. To speed up generation, you should point to folder that directly contains annotated files f.i. controllers or resources package.

outputDir

default: "$project.buildDir/resources/main/static/doc"

Where to generate output.

include

default: []

example: [".*\\\\.(clj|cls|coffee|cpp|cs|dart|erl|exs?|go|groovy|ino?|java|js|jsx|kt|litcoffee|lua|p|php?|pl|pm|py|rb|scala|ts|vue)$"]

RegEx filter to select files that should be parsed. Multiple includes can be used.

exclude

default: []

RegEx filter to select files/dirs that should not be parsed. Multiple excludes can be used.

configFile

default: "$project.buildDir/apidoc/apidoc.json"

Path to config file OR to directory containing config file apidoc.json. This setting is used by both tasks.

template

default: ""

Path to directory containing apidoc template.

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.