Marwes / schemafy

Crate for generating rust types from a json schema
MIT License
242 stars 51 forks source link

Handle arrays where the item type is an object define inline. #15

Closed adeschamps closed 6 years ago

adeschamps commented 6 years ago

Previously, the generated code would have a name conflict, such as:

struct Foo {
    // fields
}

type Foo = Vec<Foo>;

Now it'll append Item to objects that are defined inline:

struct FooItem {
    // fields
}

type Foo = Vec<FooItem>;
adeschamps commented 6 years ago

I was working on this at the same time as #14 - I think if you accept that PR, I can rebase this one and the tests will pass.

adeschamps commented 6 years ago

Rebased and passing now.

Marwes commented 6 years ago

Thanks, released as 0.4.4