Skip to content

DominoKit/domino-autorest-jackson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

domino-autorest-jackson

The aim of this project is to integrate gwt-jackson-apt with autorest.

How to use:

  • First add the dependency for domino-autorest-jackson
<dependency>
    <groupId>org.dominokit</groupId>
    <artifactId>domino-autorest-jackson</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>org.dominokit</groupId>
    <artifactId>autorest-jackson</artifactId>
    <version>1.0-SNAPSHOT</version>
    <classifier>sources</classifier>
</dependency>
  • Add snapshots repository in your pom.xml
<repositories>
    <repository>
        <id>sonatype-snapshots-repo</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
        </snapshots>
    </repository>
</repositories>
  • Add jackson-apt-processor dependency
<dependency>
    <groupId>org.dominokit.jacksonapt</groupId>
    <artifactId>jackson-apt-processor</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>
  • Add the module in your *.gwt.xml
<inherits name="org.dominokit.autorest.jackson.JacksonAutoRest"/>
  • Define package-info.java file and annotate it with @JSONRegistration annotation passing your module name:
@JSONRegistration("Foo")
package com.foo;

import org.dominokit.jacksonapt.annotation.JSONRegistration;
  • Use JacksonResourceBuilder and pass it the generated registry as follows:
new JacksonResourceBuilder(new FooJsonRegistry());

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages