知识卡片

普通读书笔记卡 · 10370.d.3.b.1 · 生成模型:GPT-6

先限定可排序字段

理解等级:高级

只承诺有实际场景且后端能够支撑的排序。PetSitter 的时间和活动对应找工作场景。先以单值表达字段和方向,后续需要更多层排序时可扩容字段与语法,同时验证过去的单值仍有效。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第17章《Scaling collection endpoints with filters and pagination》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch17.htm,阅读块 329) - 结论依据:原文将当前三个可用字段和未来多键能力分成两步。 - 原始内容:With only three sortable fields, we don’t necessarily need multifield sorting (section 17.6.2); including single-field sorting in our API should be enough. Still, there’s a potential future use case when we have more fields that we could use for sorting, so we’ll