Last active
September 8, 2016 11:29
-
-
Save matthesrieke/a7b3e9ab1d6897105d375e0097f1b199 to your computer and use it in GitHub Desktop.
PubSub REST swagger
This file contains hidden or 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
# PubSub REST API spec in YAML | |
swagger: '2.0' | |
info: | |
title: PubSub REST API | |
description: PubSub REST binding | |
version: "1.0.0" | |
# the domain of the service | |
host: pubsub.host | |
# array of all schemes that the API supports | |
schemes: | |
- https | |
- http | |
# will be prefixed to all paths | |
basePath: /v1 | |
produces: | |
- application/json | |
paths: | |
/: | |
get: | |
summary: Service Capabilities | |
description: | | |
Endpoint representing the service's capabilities. Can be used as an entry point to the service. | |
tags: | |
- capabilities | |
responses: | |
200: | |
description: The service capabalities overview | |
schema: | |
$ref: '#/definitions/Capabilities' | |
default: | |
description: Unexpected error | |
schema: | |
$ref: '#/definitions/Error' | |
/publications: | |
get: | |
summary: available publications | |
description: | | |
Endpoint representing the service's capabilities. Can be used as an entry point to the service. | |
tags: | |
- publications | |
responses: | |
200: | |
description: The publications provided by the service | |
schema: | |
type: array | |
items: | |
$ref: '#/definitions/Publications' | |
default: | |
description: Unexpected error | |
schema: | |
$ref: '#/definitions/Error' | |
/publications/{identifier}: | |
get: | |
summary: available publications | |
description: | | |
Endpoint representing one publications. | |
tags: | |
- publications | |
parameters: | |
- name: identifier | |
in: path | |
required: true | |
type: string | |
description: the specific publication id | |
responses: | |
200: | |
description: The publication object | |
schema: | |
$ref: '#/definitions/Publication' | |
default: | |
description: Unexpected error | |
schema: | |
$ref: '#/definitions/Error' | |
definitions: | |
Capabilities: | |
type: object | |
properties: | |
serviceInfo: | |
$ref: "#/definitions/ServiceInfo" | |
operationsMetadata: | |
$ref: "#/definitions/OperationsMetadata" | |
publications: | |
type: string | |
description: Link to the publications resource | |
deliveryMethods: | |
type: string | |
description: Link to the deliveryMethods resource | |
filterCapabilities: | |
type: string | |
description: Link to the filterCapabilities resource | |
ServiceInfo: | |
type: object | |
properties: | |
contact: | |
$ref: '#/definitions/Contact' | |
Contact: | |
type: object | |
properties: | |
name: | |
type: string | |
description: the service provider name | |
email: | |
type: string | |
description: the service provider email addressows | |
OperationsMetadata: | |
type: array | |
items: | |
$ref: "#/definitions/Operation" | |
Operation: | |
type: object | |
properties: | |
name: | |
type: string | |
dcps: | |
type: array | |
items: | |
$ref: "#/definitions/DCP" | |
DCP: | |
type: object | |
properties: | |
method: | |
type: string | |
href: | |
type: string | |
contentType: | |
type: string | |
Publications: | |
type: object | |
properties: | |
identifier: | |
type: string | |
description: the service-wide unique id of the publication | |
href: | |
type: string | |
description: "[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code." | |
Publication: | |
type: object | |
properties: | |
identifier: | |
type: string | |
description: the service-wide unique id of the publication | |
abstract: | |
type: string | |
description: Textual description of the publications | |
Error: | |
type: object | |
properties: | |
code: | |
type: integer | |
format: int32 | |
message: | |
type: string | |
fields: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment