From f648bdca3d5208d00febbd8deaa1a1733c1dd6bb Mon Sep 17 00:00:00 2001 From: ubuntu Date: Thu, 14 Jul 2022 09:39:50 +0800 Subject: [PATCH] json schema for resize of restful Signed-off-by: haozi007 --- ...at-Add-json-spec-for-rest-resize-api.patch | 62 +++++++++++++++++++ lcr.spec | 11 +++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 0001-feat-Add-json-spec-for-rest-resize-api.patch diff --git a/0001-feat-Add-json-spec-for-rest-resize-api.patch b/0001-feat-Add-json-spec-for-rest-resize-api.patch new file mode 100644 index 0000000..aa1f971 --- /dev/null +++ b/0001-feat-Add-json-spec-for-rest-resize-api.patch @@ -0,0 +1,62 @@ +From 72985299db95706fd1988de4f5fa88a8cfd55367 Mon Sep 17 00:00:00 2001 +From: "Neil.wrz" +Date: Tue, 5 Jul 2022 18:23:42 -0700 +Subject: [PATCH] feat Add json spec for rest resize api + +Signed-off-by: Neil.wrz +--- + src/json/schema/container/resize-request.json | 18 ++++++++++++++++++ + src/json/schema/container/resize-response.json | 15 +++++++++++++++ + 2 files changed, 33 insertions(+) + create mode 100644 src/json/schema/container/resize-request.json + create mode 100644 src/json/schema/container/resize-response.json + +diff --git a/src/json/schema/container/resize-request.json b/src/json/schema/container/resize-request.json +new file mode 100644 +index 0000000..8a8455f +--- /dev/null ++++ b/src/json/schema/container/resize-request.json +@@ -0,0 +1,18 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "id": { ++ "type": "string" ++ }, ++ "suffix": { ++ "type": "string" ++ }, ++ "height": { ++ "type": "uint32" ++ }, ++ "width": { ++ "type": "uint32" ++ } ++ } ++} +diff --git a/src/json/schema/container/resize-response.json b/src/json/schema/container/resize-response.json +new file mode 100644 +index 0000000..4bfafd6 +--- /dev/null ++++ b/src/json/schema/container/resize-response.json +@@ -0,0 +1,15 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "id":{ ++ "type":"string" ++ }, ++ "cc": { ++ "type": "uint32" ++ }, ++ "errmsg": { ++ "type": "string" ++ } ++ } ++} +\ No newline at end of file +-- +2.25.1 + diff --git a/lcr.spec b/lcr.spec index 7b58b90..d66fb83 100644 --- a/lcr.spec +++ b/lcr.spec @@ -1,5 +1,5 @@ %global _version 2.0.8 -%global _release 1 +%global _release 2 %global _inner_name isula_libutils Name: lcr @@ -12,6 +12,9 @@ Group: Applications/System License: LGPLv2.1+ BuildRoot: %{_tmppath}/lcr-%{version} + +Patch0001: 0001-feat-Add-json-spec-for-rest-resize-api.patch + %define lxcver 4.0.3-2021112501 BuildRequires: cmake gcc gcc-c++ git @@ -99,6 +102,12 @@ rm -rf %{buildroot} %{_includedir}/%{_inner_name}/*.h %changelog +* Thu Jul 14 2022 haozi007 - 2.0.8-2 +- Type: enhancement +- ID: NA +- SUG: NA +- DESC: add resize restful json + * Mon Jul 04 2022 czrz - 2.0.8-1 - Type: enhancement - ID: NA