Skip to content

v1.6 - Schema updates, improved Java support, Objective-C optimizations and dependency graph analysis

Latest
Compare
Choose a tag to compare
@rahul-malik rahul-malik released this 07 Jan 19:52
· 29 commits to master since this release
8ee84c2

Updates

General

Nested object definitions.

Previously it was required to create a new file for each schema. Now we support declaring types within types which can be useful for ones that only make sense in a certain scope or are fairly minimal.

Example schema declaration:

{
    "some_property" : {
        "type": "object",
        "title": "nested",
        "properties": {
            "id": { "type": "integer" },
            "name": { "type": "string" }
        }
    }
}

JSON dependency graph output

The behavior of the --print_deps output has changed to be JSON by default. This allows for tooling to be built to visualize or analyze dependency graph of your schemas.

Given this command using our example schemas:

plank --print_deps Examples/PDK/pin.json                                                                                                                                                     

You'll get an output with it's dependencies and any inherited types (via extends keyword)

{
  "pin" : [
    "image",
    "board",
    "user"
  ]
}

CI

We've migrated our CI entirely to Github Actions which will make it easier for contributors to analyze logs and build failures.

Objective-C

  • Optimizations around memory footprint of properties
  • Test updates for equality methods

Java

  • Removed AutoValue as a dependency
  • Support for tracking properties which are set
  • ADT, equality and nullability support
  • TypeAdapters derived from Schema definitions

Changes

8ee84c2 Mention nested object types in the documentation (#258)
2346a29 Support nested object type definitions (#256)
85e802f Mark generated files using 'linguist-generated' (#257)
e4e5e72 Remove trailing space after integer-based enums (#255)
9e5c65f Missing @SerializedName annotation on integer-based enums (#253)
fbcd34f Convert deps command output to produce JSON (#252)
c232819 Java model potentially missing import for types contained in maps and lists (#251)
921c98f Upgrade swiftformat and swiftlint (#250)
979e358 Java ADT partial implementation (#249)
41c25a8 Migrate CI to Github CI/CD (#239)
eeb4918 Support configurable URI types for Java (#245)
618acaa Optionally log unknown properties in TypeAdapter.read (#243)
9d367a5 Java equals() should evaluate primitives first (#244)
a27b144 Check _bits directly in internal calls (#242)
f650f01 Order modifiers according to the Java spec (#241)
42a168b Make generated TypeAdapter classes private (#240)
690a266 Only allocate _bits when necessary (#238)
55b0a25 Use transitiveProperties to gather Java imports (#237)
fa2e15e Only import the necessary set of types (#235)
920dcee Stop importing java.lang.annotation.Retention{Policy} (#234)
01cf3e9 Stop importing com.google.gson.JsonElement (#233)
6253078 Add the Plank project URL to the file comment header (#232)
4c794b2 Java model property annotations should be sorted deterministically (#231)
bf771de Java model TypeAdapter write method should not use delegateAdapter. (#227)
730f8e1 Add more nullability annotations to Java models (#228)
f683102 Java model TypeAdapter should not not instantiate its inner TypeAdapters until needed (#226)
102d645 Java models should not include null fields when serialized into Json (#225)
faadfa9 Java Model Builder.build method should be annotated with NonNull (#223)
7b054be Java model - _bits field should be deserialized if it's present in the JSON (#221)
bc8c8fd Java Model Decorators (beta) (#217)
738fb3e Builder property variables should not have @SerializedName annotation (#220)
d4a714d Emit BOOL properties as bitfields (#208)
47fb542 Add equality tests for ObjC (#219)
c7fe044 Missing call to set tracking isSet-bit in Java model merging (#218)
d3c6322 Use smaller enum types to reduce object sizes. (#207)
ef88906 Use a boolean[] array for tracking set-bits so we can accommodate models with more than 32 fields (fixes integer overflow) (#216)
32f2fe5 Add option to generate Java private setters (#212)
8d23c9b Fix invalid call to Builder-setter from Java TypeAdapter (#211)
427edd4 Add support for androidx Nullability annotations (#204)
f368cd1 Add a static TYPE variable to java models (#201)
bdd00b0 Toolchain updates (#196)
a8e91d3 Remove local shadow variable self.properties should be used for clarity. (#202)
a2d1022 Fix archive command to work also with Swift 5 (#200)
d467436 Avoid use of reflection-based deserialization in Java model (#194)
02d18ba Add linter for making sure linux main is kept up to date (#192)
5e5ed22 Don't use ObjectiveC-based handling of reserved keywords for Java (#187)
2dd9ed8 Add missing check for null json token (#188)
06925b8 Use standard Java enum types for enum properties (#184)
e63f15c For Boolean, Double and Integer properties, getters should be NonNull (#178)
efe3c84 Build Java sources during integration tests (#176)
47ad603 Add custom TypeAdapter for Java models that will allow for setting _bits field (#177)
f38aa84 Fix missing comma in Java model constructor (#175)
3cb4722 Update docs to reflect that plank is for more than Objective-C (#173)
7d17623 Remove AutoValue from Java generated models (#159)
4372837 Update variable name substitution logic (#157)
fd4dea5 Remove unused CI directory
1d44870 Add swiftlint / swiftformat in Package.swift, fix issues (#168)