DEV: Add include_subcategories param to api docs (#14534)

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
diff --git a/spec/requests/api/categories_spec.rb b/spec/requests/api/categories_spec.rb
index 2d34f25..cf8298e 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 }

GitHub sha: aaf7ac8936a7b29ebdc67d2a363d3fe424666f59

This commit appears in #14534 which was approved by markvanlan. It was merged by blake.