Skip to content
Snippets Groups Projects
Commit 89e9e7f5 authored by David Trattnig's avatar David Trattnig
Browse files

Update spec.

parent 709bf63b
No related branches found
No related tags found
No related merge requests found
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: AURA Engine API title: AURA Engine API
description: This is the AURA Engine API. Read more at https://gitlab.servus.at/aura/engine. description: This is the AURA Engine API.
contact: contact:
email: david.trattnig@subsquare.at email: david.trattnig@subsquare.at
license: license:
name: AGPL 3.0 name: AGPL 3.0
url: https://www.gnu.org/licenses/agpl-3.0.en.html url: https://www.gnu.org/licenses/agpl-3.0.en.html
version: 1.0.0 version: 1.0.0
externalDocs:
description: Find more info here
url: https://gitlab.servus.at/aura/engine-api
servers: servers:
- url: '{protocol}://{api-host}:{port}/api/{version}' - url: '{protocol}://{api-host}:{port}/api/{version}'
description: Engine API description: Engine API
...@@ -74,7 +77,7 @@ paths: ...@@ -74,7 +77,7 @@ paths:
"400": "400":
description: bad input parameter description: bad input parameter
x-openapi-router-controller: src.rest.controllers.public_controller x-openapi-router-controller: src.rest.controllers.public_controller
/trackservice/{trackId}: /trackservice/{track_id}:
get: get:
tags: tags:
- public - public
...@@ -83,7 +86,7 @@ paths: ...@@ -83,7 +86,7 @@ paths:
Retrieves a single track by its ID. Retrieves a single track by its ID.
operationId: get_track operationId: get_track
parameters: parameters:
- name: trackId - name: track_id
in: path in: path
description: ID of the track-service entry description: ID of the track-service entry
required: true required: true
...@@ -203,7 +206,7 @@ paths: ...@@ -203,7 +206,7 @@ paths:
"400": "400":
description: bad input parameter description: bad input parameter
x-openapi-router-controller: src.rest.controllers.internal_controller x-openapi-router-controller: src.rest.controllers.internal_controller
/engine/{engineNumber}/health: /engine/{engine_number}/health:
get: get:
tags: tags:
- internal - internal
...@@ -212,7 +215,7 @@ paths: ...@@ -212,7 +215,7 @@ paths:
Retrieves the most recent health info of the requested engine Retrieves the most recent health info of the requested engine
operationId: get_engine_health operationId: get_engine_health
parameters: parameters:
- name: engineNumber - name: engine_number
in: path in: path
description: Number of the engine description: Number of the engine
required: true required: true
...@@ -240,7 +243,7 @@ paths: ...@@ -240,7 +243,7 @@ paths:
Logs another health entry for the given engine Logs another health entry for the given engine
operationId: log_engine_health operationId: log_engine_health
parameters: parameters:
- name: engineNumber - name: engine_number
in: path in: path
description: Number of the engine description: Number of the engine
required: true required: true
...@@ -256,7 +259,7 @@ paths: ...@@ -256,7 +259,7 @@ paths:
"400": "400":
description: bad input parameter description: bad input parameter
x-openapi-router-controller: src.rest.controllers.internal_controller x-openapi-router-controller: src.rest.controllers.internal_controller
/engine/{engineNumber}/activate: /engine/{engine_number}/activate:
put: put:
tags: tags:
- internal - internal
...@@ -265,7 +268,7 @@ paths: ...@@ -265,7 +268,7 @@ paths:
Activates one engine and deactivates the other Activates one engine and deactivates the other
operationId: activate_engine operationId: activate_engine
parameters: parameters:
- name: engineNumber - name: engine_number
in: path in: path
description: Number of the engine description: Number of the engine
required: true required: true
......
...@@ -20,7 +20,7 @@ class TestInternalController(BaseTestCase): ...@@ -20,7 +20,7 @@ class TestInternalController(BaseTestCase):
Set active engine Set active engine
""" """
response = self.client.open( response = self.client.open(
'/api/v1/engine/{engineNumber}/activate'.format(engine_number=2), '/api/v1/engine/{engine_number}/activate'.format(engine_number=2),
method='PUT') method='PUT')
self.assert200(response, self.assert200(response,
'Response body is : ' + response.data.decode('utf-8')) 'Response body is : ' + response.data.decode('utf-8'))
...@@ -42,7 +42,7 @@ class TestInternalController(BaseTestCase): ...@@ -42,7 +42,7 @@ class TestInternalController(BaseTestCase):
Get most recent health info Get most recent health info
""" """
response = self.client.open( response = self.client.open(
'/api/v1/engine/{engineNumber}/health'.format(engine_number=2), '/api/v1/engine/{engine_number}/health'.format(engine_number=2),
method='GET') method='GET')
self.assert200(response, self.assert200(response,
'Response body is : ' + response.data.decode('utf-8')) 'Response body is : ' + response.data.decode('utf-8'))
...@@ -64,7 +64,7 @@ class TestInternalController(BaseTestCase): ...@@ -64,7 +64,7 @@ class TestInternalController(BaseTestCase):
Log health info Log health info
""" """
response = self.client.open( response = self.client.open(
'/api/v1/engine/{engineNumber}/health'.format(engine_number=2), '/api/v1/engine/{engine_number}/health'.format(engine_number=2),
method='POST') method='POST')
self.assert200(response, self.assert200(response,
'Response body is : ' + response.data.decode('utf-8')) 'Response body is : ' + response.data.decode('utf-8'))
......
...@@ -41,7 +41,7 @@ class TestPublicController(BaseTestCase): ...@@ -41,7 +41,7 @@ class TestPublicController(BaseTestCase):
Get a single track by ID Get a single track by ID
""" """
response = self.client.open( response = self.client.open(
'/api/v1/trackservice/{trackId}'.format(track_id=56), '/api/v1/trackservice/{track_id}'.format(track_id=56),
method='GET') method='GET')
self.assert200(response, self.assert200(response,
'Response body is : ' + response.data.decode('utf-8')) 'Response body is : ' + response.data.decode('utf-8'))
...@@ -66,7 +66,7 @@ class TestPublicController(BaseTestCase): ...@@ -66,7 +66,7 @@ class TestPublicController(BaseTestCase):
Get next playlist Get next playlist
""" """
response = self.client.open( response = self.client.open(
'api/v1/playlist/next', '/api/v1/playlist/next',
method='GET') method='GET')
self.assert200(response, self.assert200(response,
'Response body is : ' + response.data.decode('utf-8')) 'Response body is : ' + response.data.decode('utf-8'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment