From 208c6f62235b8ca53c1773dfac17c98d1210e729 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Thu, 9 Apr 2020 11:03:42 +0800 Subject: [PATCH] Add version API to swagger 1. Add version API to swagger 2. Update the description for query Signed-off-by: Wenkai Yin --- api/swagger.yaml | 15 +++++++++++++++ api/v2.0/swagger.yaml | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index a9f082f47..fda5fd3c0 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -18,6 +18,21 @@ securityDefinitions: security: - basicAuth: [] paths: + /version: + get: + summary: Get API version + description: Get the version of API that supported by the Harbor instance. + tags: + - Version + responses: + '200': + description: The supported API version + schema: + type: object + properties: + version: + type: string + /chartrepo/health: get: summary: Check the health of chart repository service. diff --git a/api/v2.0/swagger.yaml b/api/v2.0/swagger.yaml index e76f0b4c1..0bfde2550 100644 --- a/api/v2.0/swagger.yaml +++ b/api/v2.0/swagger.yaml @@ -641,7 +641,7 @@ paths: parameters: query: name: q - description: Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3=[min~max] + description: Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3=[min~max] in: query type: string required: false