microsoft / microsoft/OpenAPI.NET

Support ability to return compact JSON format when calling SerializeAsJsonAsync

未关闭 适合新手
#2,798 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C#
星标
1.6k
派生
286
平均合并
6 小时 38 分钟
30 天内合并 PR
35

描述

Is your feature request related to a problem? Please describe.
I would like to obtain a compact json format when calling OpenApiSerializableExtensions.SerializeAsJsonAsync

Describe the solution you'd like
That could be done by adding an optional OpenApiJsonWriterSettings parameter to the SerializeAsJsonAsync method (with Terse = true if compact format needed)

Describe alternatives you've considered
Currently i can parse and re-serialize json to obtain a minified format but it would be better to just be able to have the right format immediately.

Additional context
I'm able to propose a pull request if needed.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 OpenApiSerializableExtensions.SerializeAsJsonAsync 开始,检查当前如何处理 JSON writer 设置。添加对 issue 中所述可选 OpenApiJsonWriterSettings 的支持,验证 Terse 会生成紧凑 JSON,并在可用时运行现有的序列化测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
api
Issue 类型
功能
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
基本清楚
新手友好度
72/100

把新 issue 发到你的邮箱

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