Skip to content

[Feature request]: No way to customize json generated #3288

@NecroFilja

Description

@NecroFilja

Is your feature request related to a specific problem? Or an existing feature?

Hello,

We want to customize json generate. As we are very concentrated on performance we don't want to have new lines and indention in output. With current code it is not possible.

The only thing we could customise is - CustomDocumentSerializer, but it already receives pre-configured OpenApiJsonWriter with bool terseOutput = false so I could not do anything with it.

I couldn't write my own OpenApiJsonWriter custom implementation as TextWriter is hidden inside OpenApiJsonWriter in protected member. So technically I don;t see any way how to remove unnecessary spaces/newlines for us

Describe the solution you'd like

I would expect TextWriter is provided to custom serializer. Maybe there is more elegant solution

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions