From 7d0205c8e3ea8c4d5715e972a852234222e3ec02 Mon Sep 17 00:00:00 2001 From: Matthew Richards Date: Wed, 21 Oct 2020 11:26:33 +0000 Subject: [PATCH] #166: Adapt example filter inputs for ICAT backend --- src/swagger/initialise_spec.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/swagger/initialise_spec.py b/src/swagger/initialise_spec.py index 5147b3ff..17347d49 100644 --- a/src/swagger/initialise_spec.py +++ b/src/swagger/initialise_spec.py @@ -101,11 +101,11 @@ def initialise_spec(spec): }, }, "examples": { - "eq": {"value": [{"ID": {"eq": 1}}]}, - "like": {"value": [{"NAME": {"like": "dog"}}]}, - "gte": {"value": [{"ID": {"gte": 50}}]}, - "lte": {"value": [{"ID": {"lte": 50}}]}, - "in": {"value": [{"ID": {"in": [1, 2, 3]}}]}, + "eq": {"value": {"id": {"eq": 1}}}, + "like": {"value": [{"name": {"like": "dog"}}]}, + "gte": {"value": [{"id": {"gte": 50}}]}, + "lte": {"value": [{"id": {"lte": 50}}]}, + "in": {"value": [{"id": {"in": [1, 2, 3]}}]}, }, }, ) @@ -118,7 +118,7 @@ def initialise_spec(spec): "name": "order", "description": "Apply order filters to the query. Given a field and direction, order the returned entities.", "schema": {"type": "array", "items": {"type": "string"}}, - "examples": {"asc": {"value": ["ID asc"]}, "desc": {"value": ["ID desc"]}}, + "examples": {"asc": {"value": ["id asc"]}, "desc": {"value": ["id desc"]}}, }, )