[tests] write a schema component for dummy_domain for example
This commit is contained in:
parent
60ff99d0fb
commit
b1595beb14
|
@ -6,5 +6,22 @@ domain = {
|
|||
'id': '8b88e60a625369235b36c2d6d70756a0c02c1c7fb169fcee6dc820bcf9723f5a',
|
||||
'deps': (
|
||||
('halfapi', '=={}'.format(halfapi_version)),
|
||||
)
|
||||
),
|
||||
'schema_components': {
|
||||
'schemas': {
|
||||
'Pinnochio': {
|
||||
'type': 'object',
|
||||
'required': {
|
||||
'id',
|
||||
'name',
|
||||
'nose_size'
|
||||
},
|
||||
'properties': {
|
||||
'id': {'type': 'string'},
|
||||
'name': {'type': 'string'},
|
||||
'nose_size': {'type': 'number'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
from uuid import uuid4
|
||||
from halfapi.lib import acl
|
||||
ACLS = {
|
||||
'GET' : [{'acl':acl.public}]
|
||||
}
|
||||
def get():
|
||||
"""
|
||||
description:
|
||||
Not implemented
|
||||
description: The pinnochio guy
|
||||
responses:
|
||||
200:
|
||||
description: test response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pinnochio"
|
||||
"""
|
||||
raise NotImplementedError
|
||||
return {
|
||||
'id': str(uuid4()),
|
||||
'name': 'pinnochio',
|
||||
'nose_size': 42
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue