Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
fist pass of Swagger description for BOSH config-server
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilien committed Aug 25, 2016
1 parent d9ed0fa commit b60afbf
Showing 1 changed file with 105 additions and 0 deletions.
105 changes: 105 additions & 0 deletions descriptions/bosh/config-server/config-server.yml
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

1 comment on commit b60afbf

@maximilien
Copy link
Collaborator Author

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.

Please sign in to comment.