Giter Site home page Giter Site logo

apidemic's People

Contributors

codingsince1985 avatar gernest avatar peteraba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apidemic's Issues

Dependency management

Hi @gernest,

not very important but I thought I'd brought up adding a dependency manager like glide or dep. What's your take on it?

Roadmap suggestion

Hi @gernest,

First of all thanks for this project, I find it pretty handy and I find the code structure nice as well. I have a made a few modifications to it to better fit my need, but before I contribute back I'd like to discuss my ideas with you.

Features I already added:

  1. Enabled various HTTP Methods.
  2. Enabled imitating errors by optionally providing response code probabilities.
  3. Make 201 the default response code for POST calls to make it more REST-compliant (http://www.restapitutorial.com/lessons/httpmethods.html)

Features I'm considering adding:

  1. Reading an initial set of endpoints from a directory based on a CLI flag / Environment variable. (Currently I call a bash file on startup that will create the endpoints via curl, not the nicest workaround)
  2. Reading a swagger file and creating endpoints automatically. (This might be out of scope, but I'd find it useful.)
  3. Adding optional request validation based on the swagger file read previously. (I'm least sure about this one, but this would potentially make the error imitation
  4. Support for more API frameworks.

What are your thoughts?

In case you wondered, this is how my API structure currently looks:

// API is the struct for the json object that is passed to apidemic for registration.
type API struct {
	Endpoint                  string                 `json:"endpoint"`
	HTTPMethod                string                 `json:"http_method"`
	ResponseCodeProbabilities map[int]int            `json:"response_code_probabilities"`
	Payload                   map[string]interface{} `json:"payload"`
}

(Changes so far are 100% backwards compatible)

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.