This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fist pass of Swagger description for BOSH config-server
- Loading branch information
1 parent
d9ed0fa
commit b60afbf
Showing
1 changed file
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
swagger: '2.0' | ||
info: | ||
title: Config Server | ||
description: BOSH config server REST APIs | ||
version: "0.1.0" | ||
host: api.bosh.io | ||
schemes: | ||
- https | ||
basePath: /v1 | ||
produces: | ||
- application/json | ||
paths: | ||
/data/someKeyPath: | ||
get: | ||
summary: returns the config data added | ||
description: | | ||
whenever Director needs to retrieve a value it will use GET action. | ||
parameters: | ||
- name: someKeyPath | ||
in: query | ||
description: the path to the key to retrieve. | ||
required: true | ||
type: string | ||
responses: | ||
200: | ||
description: the JSON that was added for that path | ||
schema: | ||
$ref: '#/definitions/Data' | ||
default: | ||
description: Unexpected error | ||
schema: | ||
$ref: '#/definitions/Error' | ||
delete: | ||
summary: deletes the value associated with this path | ||
description: user can delete config values | ||
parameters: | ||
- name: someKeyPath | ||
in: query | ||
description: the path to the key to retrieve. | ||
required: true | ||
type: string | ||
responses: | ||
200: | ||
description: OK | ||
default: | ||
description: Unexpected error | ||
schema: | ||
$ref: '#/definitions/Error' | ||
put: | ||
summary: updates the config data associated with someKeyPath | ||
description: manual config value update | ||
parameters: | ||
- name: someKeyPath | ||
in: query | ||
description: the path to the key to retrieve. | ||
required: true | ||
type: string | ||
- name: request | ||
in: body | ||
description: the data to update | ||
required: true | ||
schema: | ||
$ref: '#/definitions/Data' | ||
responses: | ||
200: | ||
description: OK | ||
default: | ||
description: Unexpected error | ||
schema: | ||
$ref: '#/definitions/Error' | ||
post: | ||
summary: creates the config data associated with someKeyPath | ||
description: whenever Director generates a value it will be saved into the config server | ||
parameters: | ||
- name: someKeyPath | ||
in: query | ||
description: the path to the key to retrieve. | ||
required: true | ||
type: string | ||
- name: request | ||
in: body | ||
description: the data to update | ||
required: true | ||
schema: | ||
$ref: '#/definitions/Data' | ||
responses: | ||
200: | ||
description: OK | ||
definitions: | ||
Data: | ||
type: object | ||
description: the value for the data | ||
properties: | ||
type: | ||
type: string | ||
description: the string name of the type for the value | ||
Error: | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
message: | ||
type: string | ||
fields: | ||
type: string |
b60afbf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @cppforlife
First pass. Let's talk next Th. I want to make some more changes and tests on this.