Created
June 25, 2019 13:09
-
-
Save clemensv/6cef0b3e65704b787020de64911dc347 to your computer and use it in GitHub Desktop.
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.2", | |
"info": { | |
"title": "AMQP Management", | |
"version": "1.0" | |
}, | |
"components": { | |
"schemas": { | |
"discovery-document": { | |
"type": "object", | |
"required": [ | |
"collections" | |
], | |
"properties": { | |
"collections": { | |
"$ref": "#/components/schemas/collections" | |
}, | |
"types": { | |
"$ref": "#/components/schemas/entity-type-collection-ref" | |
}, | |
"configuration": { | |
"$ref": "#/components/schemas/configuration-ref" | |
}, | |
"operations": { | |
"$ref": "#/components/schemas/operations" | |
} | |
} | |
}, | |
"collections": { | |
"type": "object", | |
"required": [ | |
"entities" | |
], | |
"properties": { | |
"entities": { | |
"$ref": "#/components/schemas/entity-collection-ref" | |
} | |
}, | |
"additionalProperties": { | |
"$ref": "#/components/schemas/entity-collection-ref" | |
} | |
}, | |
"operations": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/operation" | |
} | |
}, | |
"configuration-ref": { | |
"type": "object", | |
"properties": { | |
"label": { | |
"type": "string" | |
}, | |
"address": { | |
"type": "string", | |
"format": "uri-reference" | |
} | |
} | |
}, | |
"entity-collection-ref": { | |
"type": "object", | |
"properties": { | |
"label": { | |
"type": "string" | |
}, | |
"address": { | |
"type": "string", | |
"format": "uri-reference" | |
} | |
} | |
}, | |
"entity-type-collection-ref": { | |
"type": "object", | |
"properties": { | |
"label": { | |
"type": "string" | |
}, | |
"address": { | |
"type": "string", | |
"format": "uri-reference" | |
} | |
} | |
}, | |
"operation": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"label": { | |
"type": "string" | |
}, | |
"address": { | |
"type": "string", | |
"format": "uri-reference" | |
}, | |
"description": { | |
"$ref": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json#/definitions/Operation" | |
} | |
} | |
}, | |
"entity-collection": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/entity" | |
} | |
}, | |
"entity": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"label": { | |
"type": "string" | |
}, | |
"tag": { | |
"type": "string" | |
}, | |
"version": { | |
"type": "string" | |
}, | |
"self": { | |
"type": "string", | |
"format": "uri-reference" | |
}, | |
"management": { | |
"type": "string", | |
"format": "uri-reference" | |
} | |
} | |
}, | |
"entity-type-collection": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/entity-type" | |
} | |
}, | |
"entity-type": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"version": { | |
"type": "string" | |
}, | |
"properties": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/entity-property" | |
} | |
} | |
} | |
}, | |
"entity-property": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"amqptype": { | |
"type": "string" | |
}, | |
"label": { | |
"type": "string" | |
}, | |
"defaultvalue": {} | |
} | |
} | |
} | |
}, | |
"paths": { | |
"/{$management}": { | |
"get": { | |
"responses": { | |
"default": { | |
"description": "", | |
"content": { | |
"application/amqp-management+json;type=discovery-document": { | |
"schema": { | |
"$ref": "#/components/schemas/discovery-document" | |
} | |
}, | |
"application/amqp-management+amqp;type=discovery-document": { | |
"schema": { | |
"$ref": "#/components/schemas/discovery-document" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/{$entity-collection}": { | |
"get": { | |
"responses": { | |
"default": { | |
"description": "", | |
"content": { | |
"application/amqp-management+json;type=entity-collection": { | |
"schema": { | |
"$ref": "#/components/schemas/entity-collection" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity-collection": { | |
"schema": { | |
"$ref": "#/components/schemas/entity-collection" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"requestBody": { | |
"content": { | |
"application/amqp-management+json;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"201": { | |
"description": "Successful creation of a new entity", | |
"headers": { | |
"Location": { | |
"description": "Self management address of the created entity", | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
"content": { | |
"application/amqp-management+json;type=entity-collection": { | |
"schema": { | |
"$ref": "#/components/schemas/entity-collection" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity-collection": { | |
"schema": { | |
"$ref": "#/components/schemas/entity-collection" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Error creating entity" | |
}, | |
"406": { | |
"description": "Content not acceptable" | |
}, | |
"419": { | |
"description": "Conflict with existing entity" | |
} | |
} | |
} | |
}, | |
"/{$entity}": { | |
"get": { | |
"responses": { | |
"200": { | |
"description": "", | |
"content": { | |
"application/amqp-management+json;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"put": { | |
"requestBody": { | |
"content": { | |
"application/amqp-management+json;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Successful update of entity", | |
"content": { | |
"application/amqp-management+json;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Error creating entity" | |
}, | |
"406": { | |
"description": "Content not acceptable" | |
}, | |
"419": { | |
"description": "Conflict with existing entity" | |
} | |
} | |
}, | |
"delete" : { | |
"parameters": [ | |
{ | |
"name": "tag", | |
"required": false | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/amqp-management+json;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity": { | |
"schema": { | |
"$ref": "#/components/schemas/entity" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"204": { | |
"description": "Successful delete of entity" | |
}, | |
"400": { | |
"description": "Error creating entity" | |
}, | |
"406": { | |
"description": "Content not acceptable" | |
}, | |
"419": { | |
"description": "Conflict with existing entity" | |
} | |
} | |
} | |
}, | |
"/{$type-collection}": { | |
"get": { | |
"responses": { | |
"default": { | |
"description": "", | |
"content": { | |
"application/amqp-management+json;type=entity-type-collection": { | |
"schema": { | |
"$ref": "#/components/schemas/entity-type-collection" | |
} | |
}, | |
"application/amqp-management+amqp;type=entity-type-collection": { | |
"schema": { | |
"$ref": "#/components/schemas/entity-type-collection" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment