Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,6 @@ Javalin.create()
.start();
```

### Usage with Helidon SE

The annotation processor will generate controller classes implementing the Helidon Service interface, which we can use
get all the Services and register them with Helidon `RoutingBuilder`.

```java
var routes = BeanScope.builder().build().list(Service.class);
var routingBuilder = Routing.builder().register(routes.stream().toArray(Service[]::new));
WebServer.builder()
.addMediaSupport(JacksonSupport.create())
.routing(routingBuilder)
.build()
.start();
```

### Usage with Helidon Nima

The annotation processor will generate controller classes implementing the Helidon HttpService interface, which we can use
Expand Down Expand Up @@ -162,36 +147,6 @@ public class WidgetController$Route implements WebRoutes {
}
```

### (Helidon SE) The generated WidgetController$Route.java is:
```java
@Generated("avaje-helidon-generator")
@Singleton
public class WidgetController$Route implements Service {

private final WidgetController controller;

public WidgetController$Route(WidgetController controller) {
this.controller = controller;
}

@Override
public void update(Routing.Rules rules) {

rules.get("/widgets/{id}", this::_getById);
rules.post("/widgets", this::_getAll);
}

private void _getById(ServerRequest req, ServerResponse res) {
int id = asInt(req.path().param("id"));
res.send(controller.getById(id));
}

private void _getAll(ServerRequest req, ServerResponse res) {
res.send(controller.getAll());
}
}
```

### (Helidon Nima) The generated WidgetController$Route.java is:

```java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<version>2.0-SNAPSHOT</version>
</parent>

<artifactId>avaje-http-nima-generator</artifactId>
<artifactId>avaje-http-helidon-generator</artifactId>

<properties>
<java.release>20</java.release>
Expand Down

This file was deleted.

10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<module>http-generator-javalin</module>
<module>http-generator-jex</module>
<module>http-generator-client</module>
<module>http-generator-nima</module>
</modules>

<profiles>
Expand All @@ -60,6 +59,15 @@
<module>tests</module>
</modules>
</profile>
<profile>
<id>jdk19plus</id>
<activation>
<jdk>[20,21]</jdk>
</activation>
<modules>
<module>http-generator-helidon</module>
</modules>
</profile>


<profile>
Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<profile>
<id>jdk19plus</id>
<activation>
<jdk>[19,20]</jdk>
<jdk>[19,20,21]</jdk>
</activation>
<modules>
<module>test-nima</module>
Expand Down
4 changes: 2 additions & 2 deletions tests/test-nima-jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</dependency>
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-nima-generator</artifactId>
<artifactId>avaje-http-helidon-generator</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
Expand All @@ -80,7 +80,7 @@
<annotationProcessorPaths>
<path>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-nima-generator</artifactId>
<artifactId>avaje-http-helidon-generator</artifactId>
<version>${project.version}</version>
</path>
<path>
Expand Down
2 changes: 1 addition & 1 deletion tests/test-nima/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<annotationProcessorPaths>
<path>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-nima-generator</artifactId>
<artifactId>avaje-http-helidon-generator</artifactId>
<version>${project.version}</version>
</path>
<path>
Expand Down