Forum Discussion

Stoplight's avatar
Stoplight
Community Manager
7 months ago

Ordering of Query Parameters

Originally posted by user brad.samuels to the Stoplight Community on 06/20/2023 at 05:01 ET.

I am currently working on an API endpoint with quite a few query parameters included - Is there a way (if not, it would be really great if we could) to change the order of query parameters so it makes more sense to the reader? The ordering currently displays (regardless of how they are ordered in the Editor) as mandatory parameters first in alphabetical order followed by non-mandatory parameters in alphabetical order.

This becomes an issue for me, because I have fields that are hard to find when separated from each other.

For example, if I had the query parameters of these (startDate, endDate, contractId, transactionId, numberOfResults, pageSize) it would separate them from the corresponding field and return like these (contractId, endDate, numberOfResults, pageSize, startDate, transactionId).

 This is a small example, but the current endpoint I am working on has roughly 16 query parameters, making it almost impossible to find the correlating fields when changing to alphabetical order.

  • a_welch (Staff) [06/22/2023 - 12:59 ET]

    I was able to validate that at this time there is not an option to order parameters. I would recommend that you submit this for consideration as a feature request. To do that use this link https://roadmap.stoplight.io/tabs/7-under-consideration and click on the Submit Idea button in the upper right hand corner.

  • Stoplight's avatar
    Stoplight
    Community Manager

    a_welch (Staff) [06/22/2023 - 12:59 ET]

    I was able to validate that at this time there is not an option to order parameters. I would recommend that you submit this for consideration as a feature request. To do that use this link https://roadmap.stoplight.io/tabs/7-under-consideration and click on the Submit Idea button in the upper right hand corner.