FORMAT: 1A
API Exmample for demonstration of different versions of JSON schema
- Request (application/json)
FORMAT: 1A
API Exmample for demonstration of different versions of JSON schema
| FORMAT: 1A | |
| HOST: http://localhost | |
| # example api | |
| Is example api | |
| # Group Users | |
| Users related resources of the **Users API** | |
| ## Users Collection [/users] |
FORMAT: 1A
HOST: http://www.google.com
In this installement of the API Blueprint tutorial we will discuss how to describe API parameters. But first let's add more messages to our system. For that we would need introduce an message identifier – id. This id will be our parameter when communicating with our API about messages.
| #!/bin/bash | |
| for i in `git log package.json | grep -e "^commit" | awk '{print $2}'`; do git diff $i^1 $i package.json 2>/dev/null | grep -e "\+ \"version\"" | sed s/,// | xargs echo $i | awk '{print "git tag -a v" $4 " " $1 " -m \"Bumped to version " $4 "\"" }'; done |
| kolotoc:~ netmilk$ git clone git://github.com/apiaryio/snowcrash.git | |
| Cloning into 'snowcrash'... | |
| remote: Counting objects: 2090, done. | |
| remote: Compressing objects: 100% (702/702), done. | |
| remote: Total 2090 (delta 1434), reused 1965 (delta 1311) | |
| Receiving objects: 100% (2090/2090), 951.94 KiB | 700.00 KiB/s, done. | |
| Resolving deltas: 100% (1434/1434), done. | |
| Checking connectivity... done | |
| kolotoc:~ netmilk$ cd snowcrash | |
| kolotoc:snowcrash netmilk$ git submodule update --init --recursive |
| language: node_js | |
| node_js: | |
| - 0.8 | |
| - 0.10 | |
| before_install: | |
| - npm install -g dredd | |
| script: ./scripts/test | |
| services: | |
| - mongodb | |
| before_script: |
| #!/bin/sh | |
| ./node_modules/coffee-script/bin/coffee app.coffee & | |
| sleep 5 | |
| PID=$! | |
| dredd apiary.apib http://localhost:3000/ | |
| RESULT=$? | |
| kill -9 $PID | |
| exit $RESULT |