From de9d16862025f56465eefff0a3ee37d4d8736209 Mon Sep 17 00:00:00 2001 From: Evgeny Smekalin Date: Thu, 28 Aug 2025 17:15:19 +0200 Subject: [PATCH] order_by query parameter will be a single key with values separated by commas --- CHANGELOG.md | 3 +++ pyproject.toml | 2 +- tests/winter_openapi/test_page_position_argument_spec.py | 2 ++ winter_openapi/inspectors/page_position_argument_inspector.py | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0752ddee..0e28c7fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [31.0.2] - 2025-08-28 +- Winter openapi order_by query parameter will be a single key with values separated by commas +- ## [31.0.1] - 2025-08-28 - Winter openapi now supports enum for order_by query parameter diff --git a/pyproject.toml b/pyproject.toml index 26b5942b..ace93c2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "winter" -version = "31.0.1" +version = "31.0.2" homepage = "https://github.com/WinterFramework/winter" description = "Web Framework with focus on python typing, dataclasses and modular design" authors = ["Alexander Egorov "] diff --git a/tests/winter_openapi/test_page_position_argument_spec.py b/tests/winter_openapi/test_page_position_argument_spec.py index 591a62da..ae709743 100644 --- a/tests/winter_openapi/test_page_position_argument_spec.py +++ b/tests/winter_openapi/test_page_position_argument_spec.py @@ -76,6 +76,8 @@ def method(self, arg1: PagePosition): # pragma: no cover "in": "query", "name": "order_by", "required": False, + "style": "form", + "explode": False, "schema": { "items": { "type": "string", diff --git a/winter_openapi/inspectors/page_position_argument_inspector.py b/winter_openapi/inspectors/page_position_argument_inspector.py index ec663d39..7c303ccc 100644 --- a/winter_openapi/inspectors/page_position_argument_inspector.py +++ b/winter_openapi/inspectors/page_position_argument_inspector.py @@ -60,6 +60,8 @@ def inspect_parameters(self, route: 'Route', schema_registry: 'SchemaRegistry') description=f'Comma separated order by fields.', required=False, param_in="query", + style="form", + explode=False, param_schema=Schema( type=DataTypes.ARRAY, default=default_sort,