Skip to content

v0.3.0

Compare
Choose a tag to compare
@calebkleveter calebkleveter released this 23 Jan 16:28
· 7 commits to master since this release
7db8317

Failing Properties

The biggest change in this release is that properties themselves handle validations, instead of the parent type. You will notice that quite a few initializers don't accept the primitive types like String or Int, but instead something like Failable<Int, ...>. You can wrap the those value in .init(value) and everything should work again:

try Name(
    prefix: .init("Mr."), 
    given: .init("Caleb"), 
    surname: .init("Kleveter"), 
    middle: .init("J"), 
    suffix: .init(nil), 
    full: .init("Caleb J Kleveter")
)

Instead of setting the properties with the .set method like you used to:

try name.set(\.prefix <~ nil)`

You can use plain old property setting:

try name.prefix <~ nil

The Environment.domain property is now public, so you can easily get the API domain for the endpoints you are using.