Skip to content

Commit 94d152f

Browse files
committed
Merge branch 'main' into grpc
2 parents 6770ac5 + f636d26 commit 94d152f

File tree

111 files changed

+1289
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1289
-656
lines changed

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,24 @@
77

88
# ∞ do more, more easily
99

10-
[Jooby](https://jooby.io) is a modern, performant and easy to use web framework for Java and Kotlin built on top of your
11-
favorite web server.
10+
[Jooby](https://jooby.io) is a modern, high-performance web framework for Java and Kotlin, designed to run seamlessly atop your preferred web server.
11+
12+
## 🚀 Built for Speed
13+
- **High Performance**: Consistently ranks among the fastest Java frameworks in TechEmpower benchmarks.
14+
- **Lightweight Footprint**: Low memory usage and fast startup times make it ideal for microservices environments.
15+
- **Choose Your Engine**: Built to run on your favorite high-performance servers: Netty, Jetty, or Undertow.
16+
17+
## 🛠️ Developer Productivity
18+
- **Instant Hot-Reload**: Save your code and see changes immediately without restarting the entire JVM.
19+
- **Modular by Design**: Only use what you need. Jooby offers over 50 "thin" modules for database access (Hibernate, JDBI, Flyway), security (Pac4j), and more.
20+
- **OpenAPI & Swagger**: Automatically generate interactive documentation for your APIs with built-in OpenAPI 3 support.
21+
22+
## 🧩 Unrivaled Flexibility
23+
- **The Power of Choice**: Use the Script API (fluent, lambda-based routes) for simple apps, or the MVC API (annotation-based) for complex enterprise projects.
24+
- **Reactive & Non-Blocking**: Full support for modern async patterns, including Kotlin Coroutines, RxJava, Reactor, and CompletableFutures.
25+
- **First-Class Kotlin Support**: Native DSLs and features designed specifically to make Kotlin development feel intuitive and type-safe.
26+
27+
## Quick Start
1228

1329
Java:
1430

@@ -72,11 +88,6 @@ Previous version
7288
- v2: [Documentation](https://jooby.io/v2) and [source code](https://github.com/jooby-project/jooby/tree/2.x)
7389
- v1: [Documentation](https://jooby.io/v1) and [source code](https://github.com/jooby-project/jooby/tree/1.x)
7490

75-
author
76-
=====
77-
78-
[Edgar Espina](https://twitter.com/edgarespina)
79-
8091
license
8192
=====
8293

docs/asciidoc/migration/4.x.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ This is a **work in progress** document, if something is wrong or missing please
1010

1111
- Java 21 as minimum
1212

13+
==== Special HTTP names
14+
15+
Starting from 4.0.7 `@XXXParam` the default annotation `value` attribute is actually that: *the default value*
16+
of the parameter. In previous version this was used it for `invalid/special HTTP names`.
17+
18+
In 3.x:
19+
20+
@QuerParam("some-http-name") String name
21+
22+
In 4.x
23+
24+
@QuerParam(name = "some-http-name") String name
25+
26+
The `value` is now reserved for default values:
27+
28+
@QueryParam("20") int pageSize
29+
1330
==== Buffer API
1431

1532
The package `io.jooby.buffer` is gone. It was replaced by `io.jooby.output` these classes

docs/asciidoc/modules/openapi-ascii.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
1) create your template: `doc/library.adoc`
66

7-
[source, asciidoc]
7+
[source, twig]
88
----
99
= 📚 {{info.title}} Guide
1010
:source-highlighter: highlightjs
@@ -250,7 +250,7 @@ Only for Schemas.
250250
====== A. Documenting a Route (The "Standard" Block)
251251
Use this pattern to document a specific endpoint, separating path parameters from query parameters.
252252

253-
[source, asciidoc]
253+
[source, twig]
254254
----
255255
// 1. Define the route
256256
{% set route = GET("/library/books/{isbn}") %}

docs/asciidoc/modules/openapi.adoc

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This library supports:
1111
- https://github.com/Redocly/redoc[Redoc] (Optional)
1212
- AsciiDoc Output (Optional)
1313
14-
Checkout the [demo project](https://github.com/jooby-project/library-demo)
14+
Checkout the https://github.com/jooby-project/library-demo[demo project]
1515

1616
=== Configuration
1717

@@ -34,10 +34,7 @@ Checkout the [demo project](https://github.com/jooby-project/library-demo)
3434
<goal>openapi</goal>
3535
</goals>
3636
<configuration>
37-
<specVersion>...</specVersion>
38-
<adoc>
39-
<file>...</file>
40-
</adoc>
37+
...
4138
</configuration>
4239
</execution>
4340
</executions>
@@ -66,6 +63,12 @@ plugins {
6663
mainClassName = "myapp.App"
6764
...
6865
66+
// Configuration
67+
68+
openAPI {
69+
....
70+
}
71+
6972
// Run openAPI task on joobyRun
7073
joobyRun.dependsOn openAPI
7174
@@ -80,6 +83,53 @@ It may slow down `hot reload` process in case of large projects with a lot of co
8083
To avoid this behaviour you can specify maven build phase which suits your needs better (e.g. `prepare-package`).
8184
====
8285

86+
==== Options
87+
88+
[cols="1,1,4a"]
89+
|===
90+
| Option | Default Value | Description
91+
92+
|`adoc`
93+
|
94+
|List of asciidoc files used as template to generate documentation:
95+
96+
.Maven:
97+
98+
<adoc>
99+
<file>guide.adoc</file>
100+
</adoc>
101+
102+
.Gradle:
103+
{
104+
adoc = ["guide.adoc"]
105+
}
106+
107+
|`basedir`
108+
| `${project.dir}`
109+
|Set base directory used it for loading openAPI template file name.
110+
111+
|`excludes`
112+
|
113+
|Regular expression used to excludes route. Example: `/web`.
114+
115+
|`includes`
116+
|
117+
|Regular expression used to includes/keep route. Example: `/api/.*`.
118+
119+
|`javadoc`
120+
|`on/true`
121+
|Turn on/off javadoc generation from Java source files. Set to `off` or `false` to turn it off.
122+
123+
|`specVersion`
124+
|`3.0`
125+
|Set the desired spec output. Possible values: `3.0` or `3.1`
126+
127+
|`templateName`
128+
|`openapi.yaml`
129+
|Set openAPI template file path.
130+
131+
|===
132+
83133
=== Usage
84134

85135
To learn how it works, let's write a simple Pet API:
@@ -145,7 +195,7 @@ You will find the files in the output build directory. If your application is `b
145195
This is the main difference with previous version. We moved from runtime to build time generation. This way we:
146196
147197
- Are able to get our OpenAPI files at build time (of course)
148-
- At runtime we don't waste resources (CPU, memory) while analyze and build the OpenAPI model
198+
- At runtime, we don't waste resources (CPU, memory) while analyze and build the OpenAPI model
149199
- We keep bootstrap as fast as possible
150200
====
151201

@@ -204,11 +254,11 @@ properties filter routes by their path pattern. The filter is a regular expressi
204254

205255
=== Documenting your API
206256

207-
Full/complete example available [here](https://github.com/jooby-project/library-demo)
257+
Full/complete example available https://github.com/jooby-project/library-demo[here]
208258

209259
==== JavaDoc comments
210260

211-
JavaDoc comments are supported on Java in script and MVC routes.
261+
JavaDoc comments are supported for script and MVC routes on Java code base. They are enable by default, to turn them off set `javadoc: off` or `javadoc: false` in your maven/gradle plugin.
212262

213263
.Script routes
214264
[source,java, role="primary"]

docs/js/highlight.min.js

Lines changed: 184 additions & 10 deletions
Large diffs are not rendered by default.

docs/js/styles/tokyo-night-dark.min.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/js/styles/tomorrow-night-bright.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/src/main/java/io/jooby/adoc/DocGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void generate(Path basedir, boolean publish, boolean v1, boolean d
4646
String version = version();
4747
// 2.x/3.x/main
4848
var branch = new Git("jooby-project", "jooby", Paths.get(System.getProperty("user.dir"))).currentBranch();
49-
var uiVersion = branch.equals("main") ? "" : "/v" + branch.replace(".x", "");
49+
var uiVersion = branch.endsWith(".x") ? "/v" + branch.replace(".x", "") : "";
5050

5151
Path asciidoc = basedir.resolve("asciidoc");
5252

@@ -267,7 +267,7 @@ private static Options createOptions(Path basedir, Path outdir, String version,
267267
attributes.imagesDir("images");
268268
attributes.sourceHighlighter("highlightjs");
269269
attributes.attribute("highlightjsdir", "js");
270-
// agate, tom-one-dark, tomorrow-night-bright, tokyo-night-dark
270+
// agate, atom-one-dark, tomorrow-night-bright, tokyo-night-dark
271271
attributes.attribute("highlightjs-theme", "agate");
272272
attributes.attribute("favicon", "images/favicon96.png");
273273

jooby/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.jooby</groupId>
88
<artifactId>jooby-project</artifactId>
9-
<version>4.0.14-SNAPSHOT</version>
9+
<version>4.0.16-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>jooby</artifactId>
1212
<name>jooby</name>

modules/jooby-apt/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.jooby</groupId>
88
<artifactId>modules</artifactId>
9-
<version>4.0.14-SNAPSHOT</version>
9+
<version>4.0.16-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>jooby-apt</artifactId>
1212
<name>jooby-apt</name>

0 commit comments

Comments
 (0)