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: fe676f334a

* fix spec
This commit is contained in:
Blake Erickson 2021-10-06 12:34:03 -06:00 committed by GitHub
parent 55dd9309e4
commit aaf7ac8936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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 }