add mcp
This commit is contained in:
@@ -49,7 +49,7 @@ def schema(request):
|
||||
'servers': [{'url': '/api/v1'}],
|
||||
'components': {'securitySchemes': {'bearerToken': {'type': 'http', 'scheme': 'bearer'}}},
|
||||
'paths': {
|
||||
'/food/today/': {'get': operation('Current local day food log, meal groups, totals, and goals', 'food:read')},
|
||||
'/food/today/': {'get': operation('Food log for an optional local calendar date, defaulting to today', 'food:read')},
|
||||
'/food/products/': {'get': operation('Search own food products', 'food:read')},
|
||||
'/food/log/': {'post': operation('Create food log entry', 'food:write', ENTRY)},
|
||||
'/food/log/{id}/': {
|
||||
@@ -77,6 +77,11 @@ def schema(request):
|
||||
'schema': {'type': 'string', 'format': 'uuid'}}]
|
||||
if 'post' in methods:
|
||||
methods['post']['responses']['201'] = methods['post']['responses'].pop('200')
|
||||
document['paths']['/food/today/']['get']['parameters'] = [{
|
||||
'name': 'date', 'in': 'query', 'required': False,
|
||||
'description': 'Local calendar date; defaults to today in the user time zone.',
|
||||
'schema': {'type': 'string', 'format': 'date'},
|
||||
}]
|
||||
document['paths']['/food/attachments/{id}/file/']['get']['responses']['200'] = {
|
||||
'description': 'Owned image bytes',
|
||||
'content': {mime: {'schema': {'type': 'string', 'format': 'binary'}}
|
||||
|
||||
Reference in New Issue
Block a user