Giter Club home page Giter Club logo

spear's Introduction

SPEAR

A service to render OpenAPI specification files stored on GitHub. It also generates API endpoints which return dummy data based on the specification.

Quickstart

Change $GOPATH to the current directory using:

source activate

Install the dependencies required:

make install

We use dep for that.

To build the binary for Linux, run the command:

make build

After that you can just run the binary created:

./bin/spear

These are environment variables you need to set to make it work:

  • GITHUB_TOKEN - your github token. Generate it here.
  • SPECS_DIR - a string with information about the target repository in format owner;repo;path: owner - owner of the repository, repo - name of the repository, path - a path within the repository to the root folder with spec files.
  • USERNAME and PASSWORD to enable Basic Auth.

Docker

You can use Docker for local development as well.

First, you need to create the compose file, use the example provided:

 cp docker-compose.yml.example docker-compose.yml

Don't forget to update values for environment variables in docker-compose.yml.

You can automatically build the binary and image then run it via next command:

make bup

Visit http://localhost:8000

TODO

  • Build a docker image
  • Branch selector
  • Support definitions in separate files
  • Build responses from examples whenever it is possible
    • Get
    • Post
    • Not only 200 responses but provide a way to request an expected response code
  • Cache requests (to avoid rate limits from Github)
    • Ability to reset the cache manually
  • Clear the code

spear's People

Contributors

zerc avatar

Watchers

James Cloos avatar Richard Quaite avatar Brian Walker avatar

spear's Issues

Semaphore Classic build config

Backing up CI config from the classic UI

  • Language: Go
  • Go version: 10.10.3
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
source ./activate
make install build
docker build -t spear:latest .
docker tag spear:latest ${ECR_HOST}/spear:latest
docker push ${ECR_HOST}/spear:latest

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.