apiblueprint - How to response for wrong passed parameter in Apiary? -


i saw following action section inside of apiary blueprint examples. want response http status 404 when user passes wrong parameter. example when user passes /questions/xyz instead of /questions/1. can see defined parameter after /questions must number when passed xyz itstead of number answer same object.

## questions [/questions/{question_id}] questions object has following attributes:  + question - can put description each attribute here. + published_at - iso8601 date when question published. + url (string)  + choices - array of choice objects.  + parameters     + question_id: `1` (number, required) - id of questions in form of integer  ### view questions detail [get]  + response 200 (application/json)              {                 "question": "favourite programming language?",                 "published_at": "2014-11-11t08:40:51.620z",                 "url": "/questions/1",                 "choices": [                     {   <!-- first object -->                         "choice": "swift",                         "url": "/questions/1/choices/1",                         "votes": 2048                     }                 ]             }  + response 404 (text/plain)      there no such message passed id. example if pass 'xyz' expect show message. 

please write me complete code. in advance.

i sorry unfortunately apiary doesn't yet support conditional responses based on body , parameters passed in request.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -