Git Product home page Git Product logo

consumer-contracts's Introduction

consumer-contracts

install the helloworld api project using openshift / node

oc new-project foo --display-name="foo" --description="foo"
oc new-app nodejs:4~https://github.com/eformat/node-hello-world-swagger --name=foo
oc expose svc foo

run the consumer contract tests (change URL's in test/user-api.js depending on your environment)

npm test

> [email protected] test ~/git/consumer-contracts
> mocha

  Contract HelloWorld
    ✓ throws an error when the consumer is missing
    ✓ throws an error when cant add a Person (1421ms)
    ✓ throws an error when People are missing (129ms)

  3 passing (2s)

use swagger editor to generate server+client code, or edit api

git clone https://github.com/swagger-api/swagger-editor.git
cd swagger-editor
npm install
npm start

OR

http://editor.swagger.io/#/

relevant documentation

https://medium.com/@enxebre/gitlab-consumer-driven-contracts-helm-and-kubernetes-b7235a60a1cb#.371jbgxp2
http://martinfowler.com/articles/consumerDrivenContracts.html
https://github.com/realestate-com-au/pact/
https://vimeo.com/187097101?mc_cid=a021cae91b&mc_eid=842a346e2f
https://www.npmjs.com/package/consumer-contracts
https://www.npmjs.com/package/swagger-mock
http://blog.modulus.io/node.js-tutorial-how-to-use-request-module
https://github.com/hapijs/joi/blob/v9.2.0/API.md
http://chaijs.com/guide/styles/

consumer-contracts's People

Contributors

eformat avatar

Watchers

 avatar James Cloos 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.