您可以设置3个不同的终结点,而其中两个则消耗相同的数据库资源(图像)。像这样:
images_schema: { "game_id": { "type": "string", "required": True, }, "title": { "type": "string", "required": True, },}games = { "schema": { "title": { "type": "string", "required": True }, "name": { "type": "string", "required": True }, }}images = { "schema": images_schema, "url": "images" # not really needed}games_images = { "schema": images_schema, "url": "games/<regex('[a-f0-9]{24}'):game_id>/images", "datasource": {"source": "images"}}
作为参考,请参阅多个API端点,一个数据源。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)