Skip to content

Allow the API to support different sorting flags #646

@jaredhendrickson13

Description

@jaredhendrickson13

Currently, the API defaults to PHP's default sorting flag whenever sorting is used. However, the default sorting flag's behavior does not always provide the desired effect (such as #639). Allowing client's, endpoints and models to pick a specific flag would provide much greater flexibility when sorting.

Discussed in #639

Originally posted by couraillon January 9, 2025
Hello,

I encounter an error I didn't have before, when using the "sort_by": "ipaddr" parameter with the POST request to /api/v2/services/dhcp_server/static_mapping to add a static mapping, IPs are not correctly reordered.
It goes from: X.X.X.139 to X.X.X.14 instead X.X.X.139, X.X.X.140, X.X.X.141, ...
Same thing with X.X.X.149 to X.X.X.15, is this a known problem?

I'm currently using API v2.3.1 with pfSense v24.03
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIssues or PRs that enhance existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions