Skip to content

Examples can no longer be formatted without formatting all JSON output #181

Open
@Blackbaud-ChristiSchneider

Description

Previously, examples were able to be formatted separately from formatting the JSON output.

This change removed the JsonSerializerSettings which would allow you to set JsonSerializerSettings.Formatting to whatever you like.

I was able to get examples to format in the swagger document by including the following in my Startup.ConfigureServices:

                .AddNewtonsoftJson(options =>
                {
                    options.SerializerSettings.Formatting = Formatting.Indented;
                });

However, this means that all responses from my endpoints are now formatted, which increases the size of the response as well as breaking any tests that were looking for specific spacing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions