知识卡片
选择过滤与投影过滤
选择过滤改变命中的资源集合,投影过滤改变每个资源返回的属性。例如按评价分数查结果与仅要顾客姓名是两个维度。投影参数只能进一步缩小已经有权读取的字段。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Scaling collection endpoints with filters and pagination 17.2 Designing filters · 查看原书依据
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.
参考来源
- 位置:《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.