Git Product home page Git Product logo

pica's Introduction

pica

Build Status go report License: MIT

Pica is a restful automated testing tool and document generate tool written in golang.

It's inspired deeply by frank.

Features

  • Basic api test (support POST, GET, PUT, DELETE, PATCH)
  • Generate api document to markdown file.
  • Benchmark webapi.(TODO)
  • Serve api document as a website.(TODO)
    • Custom theme or css for this website(TODO).
  • Api version controls, automated version release note.
  • Api version diff to show.(TODO)

screenshots/1.jpg screenshots/2.jpg

Status

It's under development.

Install

go get github.com/jerloo/pica/cmd/pica

Usage

// It's a full demo for pica.

// Init vars
name = 'demo'
description = 'This is a demo for pica.'
version = '0.0.1'
author = '[email protected] jerloo'
baseUrl = 'http://localhost:8080'

headers = {
    'Content-Type' = 'application/json'
}

// Apis format: [method] [path] [description]

// GET /api/users 获取用户列表
headers['Authorization'] = 'slfjaslkfjlasdjfjas=='

// POST /api/users 新建用户
post = {
    // 用户名
    'name' = 'test'
    // 密码
    'age' = 10
}
$ pica --help

usage: pica [<flags>] <command> [<args> ...]

A command line for api test and doc generate.

Flags:
  --help   Show context-sensitive help (also try --help-long and --help-man).
  --debug  Debug mode.

Commands:
  help [<command>...]
    Show help.

  run [<flags>] [<filename>] [<apiNames>...]
    Run api file.

  format [<flags>] [<filename>]
    Format api file.

  serve [<flags>]
    Run a document website.

  init [<filename>] [<template>]
    Init a new api file from template.

  config [<flags>]
    Config pica.

TODO

  • Document generation
  • Api document server
  • Api document version control
  • Add funny grammer provider

LICENSE

The MIT License (MIT)

Copyright (c) 2018 jerloo

pica's People

Contributors

jiejie-dev avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.