From f1194e369d9b1f688920cd55f6c3de58b85d4ab6 Mon Sep 17 00:00:00 2001 From: Artem Goncharov Date: 2024年11月18日 10:24:32 +0100 Subject: [PATCH] make sort_key and sort_dir in neutron array Neutron allows sort_key and sort_dir to be arrays. Unfortunately there is no easy way how to also cover requirements that when they are their count should pair, so leave it out for now. Change-Id: Ie60f78ebfbf0ed615adc08ed4055f1ace7ca5b2e --- codegenerator/openapi/neutron.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/codegenerator/openapi/neutron.py b/codegenerator/openapi/neutron.py index 8739545..deb59b0 100644 --- a/codegenerator/openapi/neutron.py +++ b/codegenerator/openapi/neutron.py @@ -298,15 +298,25 @@ class NeutronGenerator(OpenStackServerSourceBase): name="sort_key", location="query", description="Sort results by the attribute. This is an optional feature and may be silently ignored by the server.", - type_schema=TypeSchema(type="string"), + type_schema=TypeSchema( + type="array", items={"type": "string"} + ), + style="form", + explode=True, ), "sort_dir": ParameterSchema( name="sort_dir", location="query", description="Sort direction. This is an optional feature and may be silently ignored by the server.", type_schema=TypeSchema( - type="string", enum=["asc", "desc"] + type="array", + items={ + "type": "string", + "enum": ["asc", "desc"], + }, ), + style="form", + explode=True, ), }, "schemas": {},

AltStyle によって変換されたページ (->オリジナル) /