Skip to content

Custom ContractResolvers for Complex types #127

Closed
@jaredcnance

Description

@jaredcnance

For resources with Attrs that are complex types, there should be a way to pass a specific contract resolver for formatting. Without this support, you can end up with mixed casing results:

class MyEntity : Identifiable {
  [Attr("my-complex-type")]
  MyComplexType MyComplexType { get; set; } 
}
{
  "data": [{
    "type": "my-entity",
    "id": "1",
    "attributes": {
      "my-complex-type": {
        "Key1": "Value1"
      }
    }
  }]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions