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: /service/location/{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: type: object properties: location: type: string format: ipv4 required: - location 404: description: Not found /service/directory: get: tags: - servicelocator summary: Get service directory operationId: serviceDirectory responses: 200: description: Service with given ID content: application/json: schema: $ref: '#/components/schemas/ServiceDirectory' 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' ServiceDirectory: type: array items: $ref: '#/components/schemas/ServiceDirectoryObject' ServiceDirectoryObject: required: - id - name type: object properties: name: type: string id: type: string format: uuid ServiceLocatorObject: required: - servicearray - id - name type: object properties: name: type: string 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