Created
February 13, 2020 06:19
-
-
Save mikehelmick/f6aa2989cef3c678a2a04d3f96defcb4 to your computer and use it in GitHub Desktop.
CloudDiscovery Example - 12 Feb 2020
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
openapi: 3.0.0 | |
servers: | |
- description: CloudEvents Discovery API | |
url: https://virtserver.swaggerhub.com/mikehelmick/discovery/1.0.0 | |
info: | |
description: CloudEvents Cloud Discovery API | |
version: "1.0.0" | |
title: Cloud Discovery API | |
paths: | |
/: | |
get: | |
tags: | |
- developers | |
summary: searches available events | |
operationId: query | |
description: | | |
Search for available event providers and their types. | |
parameters: | |
- in: query | |
name: source | |
description: CloudEvents Source | |
required: false | |
schema: | |
type: string | |
- in: query | |
name: type | |
description: CloudEvents Type | |
schema: | |
type: string | |
- in: query | |
name: subject | |
description: CloudEvents Subject | |
schema: | |
type: string | |
responses: | |
'200': | |
description: Matching Events Sources | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Source' | |
'400': | |
description: bad input parameter | |
post: | |
tags: | |
- admins | |
summary: Adds an event source | |
operationId: addSource | |
description: Adds an event source to the catalog | |
responses: | |
'201': | |
description: source created | |
'400': | |
description: 'invalid input, object invalid' | |
'409': | |
description: an existing source already exists | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Source' | |
description: Event source item to add | |
components: | |
schemas: | |
Source: | |
type: object | |
required: | |
- producerURI | |
- source | |
- type | |
- specversion | |
- datacontenttype | |
properties: | |
producerURI: | |
type: string | |
example: 'https://event.broker.com/subscribe' | |
source: | |
type: string | |
example: Most Amazing Events | |
type: | |
type: string | |
example: com.amazing.events.new | |
specversion: | |
type: string | |
example: 1.0 | |
datacontenttype: | |
type: string | |
example: application/json | |
dataschema: | |
type: string | |
example: 'https://schemas.cloudevents.io/com.amazing.events.new.json' | |
dataschemacontent: | |
type: string | |
transports: | |
type: array | |
items: | |
type: string | |
example: ["http", "smtp"] | |
extensions: | |
type: array | |
items: | |
$ref: '#/components/schemas/Attribute' | |
filter: | |
type: string | |
example: 'https://docs/supported_dsl_docs' | |
options: | |
type: string | |
example: OpenAPI schema for supported options | |
subscriptionTTL: | |
type: string | |
example: 7d | |
Attribute: | |
type: object | |
properties: | |
name: | |
type: string | |
type: | |
type: string | |
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
[ | |
{ | |
"producerURI": "https://event.broker.com/subscribe", | |
"source": "Most Amazing Events", | |
"type": "com.amazing.events.new", | |
"specversion": 1, | |
"datacontenttype": "application/json", | |
"dataschema": "https://schemas.cloudevents.io/com.amazing.events.new.json", | |
"dataschemacontent": "string", | |
"transports": [ | |
"http", | |
"smtp" | |
], | |
"extensions": [ | |
{ | |
"name": "string", | |
"type": "string" | |
} | |
], | |
"filter": "https://docs/supported_dsl_docs", | |
"options": "OpenAPI schema for supported options", | |
"subscriptionTTL": "7d" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment