kernelci / kernelci/kernelci-api

Investigate `fastapi-pagination` package for getting response without alias

未关闭
#276 0 条评论 0 个 reaction 已指派 1 人 已被 @JenySadadia 认领 在 GitHub 查看
主要语言
Python
星标
10
派生
21
PR 合并指标
30 天内没有已合并 PR

描述

In case we use pagination for getting objects (e.g. nodes or regressions) from API, we need to manually serialize the response model to not have alias at the moment.
Please see the detailed issue here: https://github.com/kernelci/kernelci-api/issues/246

FastAPI provides `response_model_by_alias` flag and we can set it to `False` in the endpoint handler to fix this issue.
However, this won't work in the case of `paginated` response.
So, We have fixed this issue in API. PR for the reference: https://github.com/kernelci/kernelci-api/pull/254

Investigate if we can fix the `fastapi-pagination` package for it to eliminate the requirement to serialize the response manually.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。