FORMAT: 1A
API Exmample for demonstration of different versions of JSON schema
- Request (application/json)
FORMAT: 1A | |
HOST: http://localhost | |
# example api | |
Is example api | |
# Group Users | |
Users related resources of the **Users API** | |
## Users Collection [/users] |
FORMAT: 1A
API Exmample for demonstration of different versions of JSON schema
kolotoc:dredd-rack-sinatra-example netmilk$ bundle exec rake blueprint:verify
Verify the API conformance against its blueprint.
dredd doc/*.apib doc/*.apib.md --hookfiles doc/hooks/hooks-worker-client.coffee
info: Beginning Dredd testing...
info: Found Hookfiles: doc/hooks/hooks-worker-client.coffee
Spawning ruby worker
Dredd Ruby hooks worker is running
FORMAT: 1A | |
HOST: https://cryptic-badlands-8184.herokuapp.com/ | |
# Life saving API | |
# Emergency [/912] | |
# Request first aid [POST] | |
+ Request (application/json) |
# My API | |
# My Resource [/my_resource] | |
# Its Action [GET] | |
+ Response 200 (application/json) | |
+ Attributes (My Structure) |
== Info: About to connect() to httpbin.org port 80 (#0) | |
== Info: Trying 54.225.138.124... | |
== Info: connected | |
== Info: Connected to httpbin.org (54.225.138.124) port 80 (#0) | |
=> Send header, 149 bytes (0x95) | |
0000: 47 45 54 20 2f 68 65 61 64 65 72 73 20 48 54 54 GET /headers HTT | |
0010: 50 2f 31 2e 31 0d 0a 55 73 65 72 2d 41 67 65 6e P/1.1..User-Agen | |
0020: 74 3a 20 63 75 72 6c 2f 37 2e 32 34 2e 30 20 28 t: curl/7.24.0 ( | |
0030: 78 38 36 5f 36 34 2d 61 70 70 6c 65 2d 64 61 72 x86_64-apple-dar | |
0040: 77 69 6e 31 32 2e 30 29 20 6c 69 62 63 75 72 6c win12.0) libcurl |
kolotoc:~ netmilk$ curl --header "Content-Type: application/json" \ | |
--silent --request POST \ | |
--data-binary "{ \"product\":\"1AB23ORM\", \"quantity\": 2 }" \ | |
"http://curltraceparser.apiary.io/shopping-cart" \ | |
--trace - | \ | |
curl-trace-parser | |
> POST /shopping-cart HTTP/1.1 | |
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5 | |
> Host: curltraceparser.apiary.io | |
> Accept: */* |