initial yaml
This commit is contained in:
parent
f4d4b29335
commit
b348e5f932
175
servicelocator.yml
Normal file
175
servicelocator.yml
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user