Releases: evestera/json_typegen
v0.7.0: Output imports and collect additional properties
New features
- Output imports/use statements for Rust and Kotlin
- Collect additional/optional properties (Rust and Kotlin/Jackson)
- Various improvements to the web UI
- Various changes to better support use of
json_typegen_shared
as a library
Fixes
- Kotlin:
- Don't output empty data classes for empty objects
- Only restrict use of hard keywords (use less rename annotations)
- Output
Any?
instead ofAny
to includenull
for values of unknown type - Use correct Kotlin type alias syntax
Breaking changes
- Option parsing is now an optional feature.
This is a breaking change for anyone usingdefault-features = false
and option parsing.
Enable by adding"option-parsing"
to the list of enabled features. - Some Kotlin fields that would previously be renamed because
they are soft keywords are no longer renamed.
v0.6.0: New features and significantly improved web interface
New features
- New output format: Kotlin w/ kotlinx.serialization
- New output format: Typescript with a single nested type alias
- New option
unwrap
, for "unwrapping" wrapped JSON nodes before generating types. Combined with inference hints specifying an opaque type this allows creating types for wrappers and actual content separately - Lots of improvements to the web interface (typegen.vestera.as)
- Button to download output as file
- Button to load input from file
- Code generation moved to out of UI thread using Web Worker API. Combined with loading from file, the web interface should now be much more useable with large files. For very large files fixing #15 will still be needed.
- Input form is now stored in localStorage
- You can now use the mentioned unwrap option and inference hint blocks in the web interface
- Several other general improvements...
Fixes
- Kotlin: Cleaner output.
JsonNaming
was using Java syntax, should be correct now. - JSON Schema: Output is now targeting a specific version (draft-07)
- Fixed a bug that caused wildcards for targeting inference hints to not be applied to arrays correctly.
0.5.0: Type generated is always root type
There will now always be a type (or type alias) generated with the requested name. This used to not always be the case. While it is an obvious choice in hindsight, making this correction is unfortunately a potentially breaking change:
Breaking changes 💥
- Requesting the name Foo for a list of objects would previously
use the name Foo for the type of the elements. It will now use Foo for
the list (the root type). If the codegeneration is able to "singularize"
the name (e.g. "Points" to "Point") the object type name will be the
same as before ("Point") and the plural will be used for the list.
Crates:
0.4.1
Changes:
- Only some necessary updates to dependencies.
The lack of updates to this project is partly due to the fact that I'm working on a complete rewrite to fix some of the larger issues related to how the goals of the project has changed over time. The new version is a lot better with regards to performance on large files and WASM bundle size, but there is still some work left to do before it is ready for release. 🤷♂️
Crates:
0.4.0
Changes:
- Better defaults for generated code.
data class
for Kotlin,export interface
for TS,pub struct
for Rust - Add support for specifying JSON property name format (option
property_name_format
) to get nicer code withrename_all
with Rust/Serde andPropertyNamingStrategy
for Kotlin/Jackson. Try it out in the web interface.
As before, precompiled binaries attached below!
Crates:
0.3.3
Changes:
- A bugfix for Typescript generation (#10)
- There is a shiny new wasm-based web interface at typegen.vestera.as ✨
As before, precompiled binaries attached below!
Crates:
0.3.2: Precompiled binaries
Changes:
- Precompiled binaries! Download them below.
- Bugfix for Kotlin generation
- Output now includes trailing newline
Crates:
0.3.1: Rust 2018 keywords
Bugfix release. Rust code generation had to be made aware of new Rust 2018 keywords: async
, await
and try
.
Crates:
0.3: Rust 2018 and additional formats
Highlights:
- Additional output formats (Kotlin, Typescript, JSON Schema)
- Rust 2018 (simpler importing and derive crate no longer necessary)
Long overdue v0.2
Long overdue release, so quite a few changes. In particular, have a look at CONFIGURATION.md.
Coming up: Multiple output formats!