2021-11-30 11:20:26 +01:00
|
|
|
from halfapi.lib.responses import ORJSONResponse, NotImplementedResponse
|
2021-11-29 08:37:52 +01:00
|
|
|
from ... import acl
|
|
|
|
|
|
|
|
ROUTES = {
|
|
|
|
'abc/alphabet/{test:uuid}': {
|
|
|
|
'GET': [{'acl': acl.public}]
|
|
|
|
},
|
|
|
|
'abc/pinnochio': {
|
|
|
|
'GET': [{'acl': acl.public}]
|
|
|
|
},
|
|
|
|
'config': {
|
|
|
|
'GET': [{'acl': acl.public}]
|
|
|
|
},
|
|
|
|
'arguments': {
|
|
|
|
'GET': [{
|
|
|
|
'acl': acl.public,
|
|
|
|
'args': {
|
|
|
|
'required': {'foo', 'bar'},
|
2021-12-01 13:07:01 +01:00
|
|
|
'optional': set()
|
2021-11-29 08:37:52 +01:00
|
|
|
}
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
async def get_abc_alphabet_TEST(request, *args, **kwargs):
|
|
|
|
"""
|
|
|
|
description: Not implemented
|
2023-08-01 20:31:17 +02:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: test response
|
|
|
|
parameters:
|
|
|
|
- name: test
|
|
|
|
in: path
|
|
|
|
description: Test parameter in route with "ROUTES" constant
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
2021-11-29 08:37:52 +01:00
|
|
|
"""
|
2021-11-30 11:20:26 +01:00
|
|
|
return NotImplementedResponse()
|
2021-11-29 08:37:52 +01:00
|
|
|
|
|
|
|
async def get_abc_pinnochio(request, *args, **kwargs):
|
|
|
|
"""
|
|
|
|
description: Not implemented
|
2023-08-01 20:31:17 +02:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: test response
|
2021-11-29 08:37:52 +01:00
|
|
|
"""
|
2021-11-30 11:20:26 +01:00
|
|
|
return NotImplementedResponse()
|
2021-11-29 08:37:52 +01:00
|
|
|
|
|
|
|
async def get_config(request, *args, **kwargs):
|
|
|
|
"""
|
|
|
|
description: Not implemented
|
2023-08-01 20:31:17 +02:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: test response
|
2021-11-29 08:37:52 +01:00
|
|
|
"""
|
2021-11-30 11:20:26 +01:00
|
|
|
return NotImplementedResponse()
|
2021-11-29 08:37:52 +01:00
|
|
|
|
|
|
|
async def get_arguments(request, *args, **kwargs):
|
|
|
|
"""
|
|
|
|
description: Liste des datatypes.
|
2023-08-01 20:31:17 +02:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: test response
|
2021-11-29 08:37:52 +01:00
|
|
|
"""
|
|
|
|
return ORJSONResponse({
|
2021-11-30 11:20:26 +01:00
|
|
|
'foo': kwargs.get('data').get('foo'),
|
|
|
|
'bar': kwargs.get('data').get('bar')
|
2021-11-29 08:37:52 +01:00
|
|
|
})
|