Remora / Remora.Rest

Reusable tooling for interacting with JSON-driven REST APIs
GNU Lesser General Public License v3.0
7 stars 10 forks source link

object initializer based object construction #22

Closed akiraveliara closed 1 year ago

akiraveliara commented 1 year ago

Enables using data types that are not records using primary constructors with DataObjectConverter, such as the following scenarios:

public sealed record IWantPeopleToUseObjectInitializers : IData
{
    public required string Data { get; init; }
}

and

public class IExistInAnOlderCodebase : IData
{
    public required string Data { get; init; }
}

let me know if and what tests i should add/whether i should update anything else to go along with these changes/...