From b348e5f9325b1fb9bf7e64b68b2f4e8d42ae3ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Thu, 28 Oct 2021 12:43:26 +0200 Subject: [PATCH] initial yaml --- servicelocator.yml | 175 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 servicelocator.yml diff --git a/servicelocator.yml b/servicelocator.yml new file mode 100644 index 0000000..53fd3fe --- /dev/null +++ b/servicelocator.yml @@ -0,0 +1,175 @@ +openapi: 3.0.3 +info: + title: Service Locator + description: REST API for service location in a 5G core network + contact: + email: tormakristof@tormakristof.eu + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + version: 1.0.0 +servers: +- url: https://servicelocator.k8s.kmlabz.com +tags: +- name: servicedatabase + description: Service locator function database API +- name: servicelocator + description: Service location API +paths: + /servicelocation/{serviceID}: + get: + tags: + - servicelocator + summary: get service with location by ID + operationId: getServiceLocation + parameters: + - name: serviceID + in: path + description: ID of service + required: true + schema: + type: string + format: uuid + responses: + 200: + description: Service with given ID + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLocatorObject' + 404: + description: Not found + /service: + get: + tags: + - servicedatabase + summary: Get all services + operationId: getall + responses: + 200: + description: Array of all services + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLocator' + 404: + description: No object matching filter + post: + tags: + - servicedatabase + summary: create a service + operationId: createservice + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLocatorObject' + required: true + responses: + 200: + description: successful operation + 400: + description: JSON parse error + 417: + description: JSON invalid schema + /service/{serviceID}: + get: + tags: + - servicedatabase + summary: get service by ID + operationId: getService + parameters: + - name: serviceID + in: path + description: ID of service + required: true + schema: + type: string + format: uuid + responses: + 200: + description: Service with given ID + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLocatorObject' + 404: + description: Not found + delete: + tags: + - servicedatabase + summary: delete a service + operationId: deleteService + parameters: + - name: serviceID + in: path + description: ID of service + required: true + schema: + type: string + format: uuid + responses: + 200: + description: Service deleted + 404: + description: Not found + put: + tags: + - servicedatabase + summary: updates a service + operationId: updateservice + parameters: + - name: serviceID + in: path + description: ID of service + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLocatorObject' + required: true + responses: + 200: + description: successful operation + 400: + description: JSON parse error + 417: + description: JSON invalid schema + 404: + description: Not found +components: + schemas: + ServiceLocator: + type: array + items: + $ref: '#/components/schemas/ServiceLocatorObject' + ServiceLocatorObject: + required: + - device_id + - id + type: object + properties: + id: + type: string + format: uuid + servicearray: + $ref: '#/components/schemas/ServiceArray' + ServiceArray: + type: array + items: + $ref: '#/components/schemas/Service' + Service: + type: object + required: + - location + - zone + properties: + location: + type: string + format: ipv4 + zone: + type: string \ No newline at end of file