halfapi/tests/dummy_domain/routers/async/__init__.py

51 lines
1.1 KiB
Python
Raw Normal View History

from halfapi.lib.responses import ORJSONResponse, NotImplementedResponse
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()
}
}]
},
}
async def get_abc_alphabet_TEST(request, *args, **kwargs):
"""
description: Not implemented
"""
return NotImplementedResponse()
async def get_abc_pinnochio(request, *args, **kwargs):
"""
description: Not implemented
"""
return NotImplementedResponse()
async def get_config(request, *args, **kwargs):
"""
description: Not implemented
"""
return NotImplementedResponse()
async def get_arguments(request, *args, **kwargs):
"""
description: Liste des datatypes.
"""
return ORJSONResponse({
'foo': kwargs.get('data').get('foo'),
'bar': kwargs.get('data').get('bar')
})