From aaf7ac8936a7b29ebdc67d2a363d3fe424666f59 Mon Sep 17 00:00:00 2001 From: Blake Erickson Date: Wed, 6 Oct 2021 12:34:03 -0600 Subject: [PATCH] DEV: Add include_subcategories param to api docs (#14534) * DEV: Add include_subcategories param to api docs Adding the `include_subcategories=true` query param to the `/categories.json` api docs. Follow up to: fe676f334aa07489092b4d6af61d643ecb95aa27 * fix spec --- spec/requests/api/categories_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/requests/api/categories_spec.rb b/spec/requests/api/categories_spec.rb index 2d34f2544ed..cf8298e85ba 100644 --- a/spec/requests/api/categories_spec.rb +++ b/spec/requests/api/categories_spec.rb @@ -39,12 +39,20 @@ describe 'categories' do operationId 'listCategories' consumes 'application/json' expected_request_schema = nil + parameter name: :include_subcategories, + in: :query, + schema: { + type: :boolean, + enum: [true] + } produces 'application/json' response '200', 'success response' do expected_response_schema = load_spec_schema('category_list_response') schema expected_response_schema + let(:include_subcategories) { true } + it_behaves_like "a JSON endpoint", 200 do let(:expected_response_schema) { expected_response_schema } let(:expected_request_schema) { expected_request_schema }