知识卡片

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

选择过滤与投影过滤

理解等级:中级

选择过滤改变命中的资源集合,投影过滤改变每个资源返回的属性。例如按评价分数查结果与仅要顾客姓名是两个维度。投影参数只能进一步缩小已经有权读取的字段。

这张卡片看不懂?

已有反馈 · 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,阅读块 41) - 结论依据:原文以评价筛选和顾客字段筛选区分过滤对象。 - 原始内容:First of all, let’s consider two types of filters. The primary type we’re looking at is a selection filter, which means it selects a subset of resources from a collection. In the FarmStall API, that would be all reviews with specific ratings.