- Improve error messages
- Allow reexporting imports.
- Incubating support for using Promises instead of Observables with Angular.
- Incubating support for branded primitive types.
- Stricter typing in the runtime library.
- Remove Dictionary in generated TypeScript code and replace uses with Record<string, T>. This will probably
not affect you unless you have imported Dictionary (in which case you can define your own alias with
type Dictionary<T> = Record<string, T>
).
- Fix crash when processing some obscure class files
- Support reading class files generated by Kotlin 2.0
- Use
{providedIn: 'root'}
for Angular endpoints. This facilitates tree-shaking of unused code. - Don't create
ApinaModule
for Angular, but aprovideApina
-function instead that you can use to create. a provider. Also,HttpClient
is not automatically imported anymore, you should use Angular'sprovideHttpClient
to register a client. To migrate, removeApinaModule
from imports and use this instead:To customize Apina configuration, don't add additional providers manually, but pass parameters to{ providers: [ provideHttpClient(), provideApina() ] }
provideApina
.
- Update to Gradle 8.2.1
- Update to ASM 9.5, supporting Java 21
- Update to Kotlin Metadata 0.6.1, supporting Kotlin 1.9
- The JAR coordinates of the plugin have changed from legacy
gradle.plugin.fi.evident.apina:apina-gradle
to justfi.evident.apina:apina-gradle
. This will probably not affect you, the plugin id is still the same as before.
- Support detecting generic parameters from contra-variant types
- Improve translation of Kotlin collections
- Fix nullability analysis of Kotlin properties
- Improve translation of Kotlin inline classes. Preserve the original class names of inline-classes and register type-aliases for them. This allows one to override the translation by importing another type.
- Support Kotlin 1.7
- Translate response type
Mono<T>
asT
.
To take advantage of Gradle's lazy configuration support, properties of the plugin are now instances of Property.
Basically this means that instead of assigning directly to a property, you must call set
on it.
apina {
// Old way
target = file('apina-output.ts')
// New way
target.set(file('apina-output.ts'))
}
- Use Gradle extensions instead of using deprecated conventions to be compatible with Gradle 8.x
- Support translating Java records (#71
- Improve superclass lookup with Kotlin Serialization
- Improved nullability annotation handling in Kotlin Serialization
- Support private properties in Kotlin Serialization
- Improved Kotlin Serialization -support: handle non-constructor properties and inheritance
- Update ASM to 9.2, supporting Java 18
- Initial support for Kotlin Serialization as an alternative to Jackson
- Bump Gradle version to 7.0
- Remove publishing dependencies to Bintray
- Add flag for translating nullable types as
Type | undefined
instead ofType | null
(#65, thanks to tuomoa)
- Allow registering alternative translated names for classes
- Allow registering serializers for dictionaries (#38)
- Send required request headers in ES6 runtime (#63)
- Fix duplicate class name assertion (#64)
- Update ASM to 8.0.1, supporting Java 14 bytecode.
- Bundle relocated version of ASM to prevent classpath conflicts with other libraries.
- Don't require support for
Object.entries
in generated TypeScript.
- Find subclasses of sealed Kotlin classes without using
@JsonSubTypes
. - Write Swift enum definitions for discriminated unions
- Support generating methods that only create a request URL instead of making a real request (#48)
- Consult the field corresponding to a getter when considering ignore-annotations
- Ignore properties marked with
java.beans.Transient
ororg.springframework.data.annotation.Transient
- Ignore transient fields, unless they have getters
- Fix race condition regarding the creation of shadowJar (#56)
- Fix empty response as null serialization (#58)
- Write generated data-types as interfaces instead of classes.
- Support Jackson's @JsonUnwrapped (#16)
- Exclude injected parameters from generated model. (#54)
- Initial support for targeting Swift. Note that this is still incubating and the generated code is might to have breaking changes in minor releases.
- Support specifying platform and controller patterns when using command line runner
- Relax parsing HTTP methods: if multiple methods are specified, use first instead of failing.
- Allow translating JSON objects to interfaces instead of classes
- Add manual
- Support Jackson subtypes as discriminated unions (#50)
- Improve translation of @JsonValue types (#41)
- Change
ANGULAR2
platform name toANGULAR
. - Support other nullability annotations in addition to JetBrains' annotations.
- Add new
es6
platform target, allowing using Apina without Angular.
- Support resolving base path and generic parameters from subclass when controller methods are defined in superclass.
- Search controller methods for superclasses of controllers
- Support Java 11
- Fix classpath scanning on Windows.
- Make order of written elements deterministic to help with build caching.
- Speed up class loading by trying to avoid parsing unnecessary classfiles
- Import
Observable
fromrxjs
instead ofrxjs/Observable
- Improve up-to-date detection
- Support caching
- Support parsing module-info files
- Update asm to 6.0, allowing parsing of Java 9 bytecode.
- Allow generated code to compile with
noImplicitAny
.
- Fix invalid pom.
- Omit null values from request params, again.
- Usage
HttpClient
instead ofHttp
for making request, thus requiring Angular 4.3.
- Add
removedUrlPrefix
parameter that can be used to strip a prefix from the generated URLs
- Omit null values from request params (#34)
- Simplify writing custom ApinaEndpointContexts
- Change handling of enumerations. New
DEFAULT
-mode is to serialize enums as string enums. OldENUM
-mode is nowINT_ENUM
andSTRING
isSTRING_UNION
. (#37) - Remove support for Angular 1 (#36)
- Support Java 11 (thanks to Markus Kouko).
- Support for parsing Java 9 module-info files (thanks to Markus Kouko).
- Fix qualified type name generation for nullable types.
- Fix typing of Promise to be compatible with latest AngularJS typings.
- Allow specifying which endpoints to include in generated API.
assemble
no longer depends on Apina by default, you need to register wanted dependency yourself
- Fix response mapping broken in 3ca5cd9.
- Support
--strictNullChecks
in generated Angular 2 code.
- Fix imports in generated Angular 2 code
- Fix passing request parameters in Angular 2 backend.
- Fix parsing generic signatures with shadowing (#33)
- Upgraded to Kotlin 1.1.1
- Unwrap logical return type from a possible wrapper before analyzing it. That is, interpret
methods returning
ResponseEntity<T>
,HttpEntity<T>
orCallable<T>
as methods returning justT
.
- Improvements to handling some obscure generic types.
- Support for using string union types (
type MyEnum = "FOO" | "BAR" | "BAZ"
) instead ofenum
-types for representing enums in TypeScript.
- Built against Gradle 3.3
- Fix issue with loading resources
- Support reading nested libraries from JAR/WAR-archives.
- Support serialization of maps with wildcard parameters.
- Print warning instead of failing if there are invalid classpath entries.
- New alias resolution broke attributes without aliases.
- More complete alias resolution for Spring.
- Support @AliasFor without explicit attribute name. Use the name of the original attribute if @AliasFor does not specify a name.
- Add support for Spring's meta-annotations and
@AliasFor
when resolving annotations. (#30)
- Converted most of the codebase to Kotlin.
- Create nullable types in TypeScript output if
@Nullable
orOptional<T>
is use in Jackson classes.
- Remove automatic
.share()
calls from returnedObservable
s in Angular 2 backend. Instead, return theObservable
exactly the same way that Angular'sHttp
does, letting caller decide appropriate strategy for sharing (if needed).
- Provide default value for platform when using Gradle.
- Add support for Angular 2.
- Code is now generated for Angular 2 by default, you need to specify
framework = 'angular1'
to build for AngularJS.
- Support reading parameter names from debug information.
- TSLint warnings are disabled for the generated TypeScript file so that it can be included in a project regardless of TSLint configuration settings.
- Translate Java enums to TypeScript enums and register serializers for them. (#18)
- If class is found multiple times from classpath, ignore the redefinitions and just log them.
- Support inherited fields when translating data types. Inheritance is not exposed in the generated API, but rather everything is flattened to single type. (#23)
- Fail fast if duplicate class names are detected. (#19)
- Support translation of optional types (
Optional<T>
,OptionalInt
,OptionalLong
andOptionalDouble
). (#15) - Support configuring base URL for API calls. (#13)
- Use black-box translation for classes with
@JsonValue
(#11) - Support importing classes to be used instead of generated classes.
- Change to Angular context: expose
apinaSerializationConfig
asapinaConfig
instead.
- Support parsing method descriptors with differing argument counts for generic and non-generic signatures. These are not common, yet are present in some legacy class files.
- Parse Spring path patterns with braces in regular expressions properly. (e.g.
/{id:[0-9a-zA-Z]{16}}
). (#14)
- Write types as classes instead of interfaces. This means that they can be instantiated with a constructor to get an instance with all properties.
- Expose
Support.EndpointContext
as angular-serviceapinaEndpointContext
andSupport.SerializationConfig
asapinaSerializationConfig
. This allows us to override serializers. (#3) - Expose
apina.endpoints
module that directly binds all endpoint groups to angular module so that we don't need to injectendpointGroups.
The keys are available as constants of formEndpoints.Foo.KEY
. (#7)
- Generated code is simplified by translating endpoint groups directly to classes. The types are now named
Endpoints.Foo
instead ofEndpoints.Foo
. Endpoint group properties ofEndpoints.IEndpointGroups
now begin with lowercase letter, e.g.endpointGroups.Foo
is nowendpointGroups.foo
.