Skip to content

Ability to customize and/or opt-out of pluralization #1847

@bjornharrtell

Description

@bjornharrtell

It seems pluralization is applied unconditionally in FormatResourceName and it cannot be controlled because it's not a concern of JsonNamingPolicy.

I see pluralization is done with Humanizer but trying to customize it seems ineffective, i.e:

CultureInfo.CurrentCulture = new CultureInfo("da-DK");
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CurrentCulture;

But I would rather just like to be able to disable pluralization.

Would it make sense to introduce an option for this at JsonApiOptions level fx. PluralizeTypeNames with default true?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions