{ "components": { "schemas": { "service": { "description": "A single available service.", "properties": { "name": { "type": "string" }, "version": { "type": "string" }, "state": { "$ref": "#/components/schemas/service_state" }, "type": { "$ref": "#/components/schemas/service_type", "default": "public" }, "uri": { "type": "string", "description": "URI under which this service is deployed." }, "title": { "type": "string", "description": "A human-readable title of the service." }, "description": { "type": "string", "description": "A human-readable description of the service." } }, "required": [ "name", "version", "state", "type", "uri" ], "type": "object" }, "service_deleted_event": { "description": "A service has been undeployed is not reachable anymore.", "properties": { "name": { "type": "string", "description": "Name of the service that has been undeployed." }, "timestamp": { "type": "string", "format": "date-time" } }, "required": [ "name", "timestamp" ], "type": "object" }, "service_upserted_event": { "description": "A service has been newly deployed or updated.", "properties": { "service": { "$ref": "#/components/schemas/service" }, "timestamp": { "type": "string", "format": "date-time" } }, "required": [ "service", "timestamp" ], "type": "object" }, "service_state": { "description": "The current state of a single service. Possible values: unavailable,available,error.", "enum": [ "unavailable", "available", "error" ], "type": "string" }, "service_type": { "description": "Indicates where a service is reachable. Possible values: public,internal.", "enum": [ "public", "internal" ], "type": "string" }, "service_event": { "oneOf": [ { "$ref": "#/components/schemas/service_upserted_event" }, { "$ref": "#/components/schemas/service_deleted_event" } ], "discriminator": { "mapping": { "service_upserted_event": "#/components/schemas/service_upserted_event", "service_deleted_event": "#/components/schemas/service_deleted_event" }, "propertyName": "type" } } } }, "info": { "contact": {}, "description": "Registry service used for service discovery and deployment monitoring.", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, "termsOfService": "", "title": "registry-api", "version": "0.0.1" }, "openapi": "3.0.2", "paths": { "/": { "get": { "description": "Get all services.", "operationId": "get--", "parameters": [ { "deprecated": false, "example": "0", "in": "query", "required": true, "schema": { "type": "integer" }, "name": "offset" }, { "deprecated": false, "example": "25", "in": "query", "required": true, "schema": { "type": "integer" }, "name": "limit" }, { "deprecated": false, "example": "name", "in": "query", "required": true, "schema": { "type": "string" }, "name": "sort_by" }, { "deprecated": false, "example": "asc", "in": "query", "required": true, "schema": {}, "name": "direction" } ], "responses": { "200": { "description": "[de.nccloud.registry.api.v0.models.service]", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/service" }, "type": "array" } } }, "headers": {} } }, "tags": [ "service" ] } }, "//:name": { "get": { "operationId": "get--name", "parameters": [ { "deprecated": false, "in": "path", "required": true, "schema": { "type": "string" }, "name": "name" } ], "responses": { "200": { "description": "de.nccloud.registry.api.v0.models.service", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/service" } } }, "headers": {} }, "404": { "description": "unit", "content": { "application/json": { "schema": { "type": "integer", "nullable": true } } }, "headers": {} } }, "tags": [ "service" ] } }, "//:name/uri": { "get": { "description": "Get the URI of given service.", "operationId": "get--name-uri", "parameters": [ { "deprecated": false, "in": "path", "required": true, "schema": { "type": "string" }, "name": "name" } ], "responses": { "200": { "description": "string", "content": { "application/json": { "schema": { "type": "string" } } }, "headers": {} }, "404": { "description": "unit", "content": { "application/json": { "schema": { "type": "integer", "nullable": true } } }, "headers": {} } }, "tags": [ "service" ] } } }, "servers": [ {} ] }