diff options
author | Tommy Carpenter <tommy@research.att.com> | 2018-02-27 21:20:00 -0500 |
---|---|---|
committer | Tommy Carpenter <tommy@research.att.com> | 2018-03-01 11:23:40 -0500 |
commit | 16841e4acee2cc31558bdaf618d68e4349c06168 (patch) | |
tree | a9bff5ca8af6256122cc0e406bac81f8fb6fba31 /config_binding_service/swagger | |
parent | 584b93a74f760beb51f973412a092533c838faeb (diff) |
Add a new endpoint for getting arbitrary keys
Change-Id: I4888bf3c596bee72637a881830cef4835076bcb2
Issue-ID: DCAEGEN2-348
Signed-off-by: Tommy Carpenter <tommy@research.att.com>
Diffstat (limited to 'config_binding_service/swagger')
-rw-r--r-- | config_binding_service/swagger/swagger.yaml | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/config_binding_service/swagger/swagger.yaml b/config_binding_service/swagger/swagger.yaml index ac7098f..cfe0944 100644 --- a/config_binding_service/swagger/swagger.yaml +++ b/config_binding_service/swagger/swagger.yaml @@ -20,7 +20,7 @@ --- swagger: "2.0" info: - version: "2.0.0" + version: "2.1.0" title: "Config Binding Service" paths: /service_component/{service_component_name}: @@ -59,6 +59,35 @@ paths: 404: description: there is no configuration in Consul for this component + /{key}/{service_component_name}: + parameters: + - name: "key" + in: "path" + description: "this endpoint tries to pull service_component_name:key; key is the key after the colon" + required: true + type: "string" + - name: "service_component_name" + in: "path" + description: "Service Component Name." + required: true + type: "string" + get: + description: "this is an endpoint that fetches a generic service_component_name:key out of Consul. The idea is that we don't want to tie components to Consul directly in case we swap out the backend some day, so the CBS abstracts Consul from clients. The structuring and weird collision of this new API with the above is unfortunate but due to legacy concerns." + operationId: "config_binding_service.controller.get_key" + responses: + 200: + description: "OK; returns service_component_name:key" + schema: + type: object + 404: + description: "key does not exist" + schema: + type: string + 400: + description: "bad request. Currently this is only returned on :policies, which is a complex object, and should be gotten through service_component_all" + schema: + type: string + /healthcheck: get: description: "This is the health check endpoint. If this returns a 200, the server is alive and consul can be reached. If not a 200, either dead, or no connection to consul" |