From a596b906cbae236ac9e71c5bfb5a54ec573c8ba0 Mon Sep 17 00:00:00 2001 From: Jared Hendrickson Date: Thu, 6 Feb 2025 21:44:18 -0700 Subject: [PATCH] docs(oas): add sort_flags to OpenAPI schema #646 --- .../pkg/RESTAPI/Schemas/OpenAPISchema.inc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Schemas/OpenAPISchema.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Schemas/OpenAPISchema.inc index 4a67f54b..937e065b 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Schemas/OpenAPISchema.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Schemas/OpenAPISchema.inc @@ -336,13 +336,30 @@ class OpenAPISchema extends Schema { [ 'in' => 'query', 'name' => 'sort_order', - 'description' => 'Sort the response data in descending order.', + 'description' => 'The order to sort response data by.', 'schema' => [ 'type' => 'string', 'enum' => ['SORT_ASC', 'SORT_DESC'], 'nullable' => true, ], ], + [ + 'in' => 'query', + 'name' => 'sort_flags', + 'description' => 'The sort flag to use to customize the behavior of the sort.', + 'schema' => [ + 'type' => 'string', + 'nullable' => true, + 'enum' => [ + 'SORT_REGULAR', + 'SORT_NUMERIC', + 'SORT_STRING', + 'SORT_LOCALE_STRING', + 'SORT_NATURAL', + 'SORT_FLAG_CASE' + ] + ], + ], [ 'in' => 'query', 'name' => 'query',