#1316·apidoc

Option to group or add extra attribute to query param

Author: jerrensCreated Dec 7, 2022Updated Oct 18, 2023

In my REST API, I have a parameter that is only available to 'admin' users (others are for any user). I would like to include this in the API docs, but I don't see an option other than putting something in the description.

The group attribute of @apiParam looks like it would fit my needs if it were available for @apiQuery also. Then I could do:

@apiQuery (AdminOnly) {number} field This query parameter is only accessible to admin users

Assuming I could also set the group title and description with an @apiDefine entry

I tried the above but with an @apiParam and I get the warning that my field is not defined in the URL of @api and it is above the Query Parameter(s) table.

I'm open to other approaches if there is another feature already available that would help.

Another idea I had, but think would require more effort to implement (maybe via a plugin or markdown extension) would be if there was a way to apply a custom label on a field. This would also require support to allow the user to provide their own CSS definitions.