From 3d6658f0ce931ab02c8384777b25286553396751 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Fri, 22 Jan 2016 12:57:47 -0700 Subject: [PATCH] accept t/f for boolean in Api and document boolean parameter formats Change-Id: I70b295e93c6f19b471bfc6f4b31f3a7c3642d8f4 Reviewed-on: https://gerrit.instructure.com/70861 Tested-by: Jenkins Reviewed-by: Simon Williams Product-Review: Cody Cutrer QA-Review: Cody Cutrer --- doc/api/README.md | 6 ++++-- lib/canvas/plugin.rb | 4 ++-- spec/lib/canvas/plugin_spec.rb | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/api/README.md b/doc/api/README.md index b3339d410be..d671be5d31e 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -17,6 +17,8 @@ All API responses are in JSON format. All integer ids in Canvas are 64 bit integers. +All boolean parameters can be passed as true/false, t/f, yes/no, y/n, on/off, or 1/0. When using JSON format, a literal true/false is preferred, rather than as a string. + For POST and PUT requests, parameters are sent using standard HTML form encoding (the application/x-www-form-urlencoded content type). @@ -26,13 +28,13 @@ POST and PUT requests may also optionally be sent in