microsoft / microsoft/OpenAPI.NET
Support ability to return compact JSON format when calling SerializeAsJsonAsync
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.6k
- Forks
- 286
- Avg merge
- 6h 38m
- Merged PRs (30d)
- 35
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at OpenApiSerializableExtensions.SerializeAsJsonAsync and inspect how JSON writer settings are currently handled. Add support for the optional OpenApiJsonWriterSettings described in the issue, verify that Terse produces compact JSON, and run the existing serialization tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100