Skip to content

Commit

Permalink
fix: minor types fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Jan 22, 2025
1 parent e9fd14c commit 915014a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
32 changes: 20 additions & 12 deletions docs/content/docs/reference/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,26 @@ is represented by `time.Time`, and so on.

User-defined types referenced by a verb will be automatically exported as FTL types.

| FTL | Go | Kotlin | Java |
| :-------------- | :---- | :----- | :--- |
| `Int` | `int` | `Long` | `Long` |
| `Float` | `float64` | `Double` | `Double` |
| `String` | `string` | `String` | `String` |
| `Bytes` | `[]byte` | `ByteArray` | `ByteArray` |
| `Bool` | `bool` | `Boolean` | `Boolean` |
| `Time` | `time.Time` | `ZonedDateTime` | `ZonedDateTime️ ` |
| `Any` | [external](../externaltypes) | [external](../externaltypes) | [external](../externaltypes) |
| `Unit` | | | |
| `Map<K,V>` | `map[K]V` | `Map<K,V>` | `Map<K,V>` |
| `Array<T>` | `[]T` | `List<T>` | `List<T>` |
| FTL | Go | Kotlin | Java |
|:-------------------|:-----------------------------|:-----------------------------|:-----------------------------|
| `Int` | `int` | `Long` | `long` |
| `optional[Int]` | `ftl.Optional[int]` | `Long?` | `Long` |
| `Float` | `float64` | `Double` | `double` |
| `optional[Float]` | `ftl.Optional[float64]` | `Double?` | `Double` |
| `String` | `string` | `String` | `String` |
| `optional[String]` | `ftl.Optional[string]` | `String?` | `@Nullable String` |
| `Bytes` | `[]byte` | `ByteArray` | `byte[]` |
| `optional[Bytes]` | `ftl.Optional[[]byte]` | `ByteArray?` | `@Nullable byte[]` |
| `Bool` | `bool` | `Boolean` | `boolean` |
| `optional[Bool]` | `ftl.Optional[bool]` | `Boolean?` | `Boolean` |
| `Time` | `time.Time` | `ZonedDateTime` | `ZonedDateTime️` |
| `optional[Time]` | `ftl.Optional[time.Time]` | `ZonedDateTime?` | `@Nullable ZonedDateTime️` |
| `Any` | [external](../externaltypes) | [external](../externaltypes) | [external](../externaltypes) |
| `Unit` | | | |
| `Map<K,V>` | `map[K]V` | `Map<K,V>` | `Map<K,V>` |
| `Array<T>` | `[]T` | `List<T>` | `List<T>` |



## Data structures

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ public void accept(ModuleBuilder moduleBuilder) {
var param = parameters[i];
if (param.parameterType.equals(ParameterType.BODY)) {
bodyParamType = endpoint.getMethodInfo().parameterType(i);
break;
}
} else if param.parameterType.equals(ParameterType.CUSTOM) {
}

if (bodyParamType instanceof ArrayType) {
Expand Down

0 comments on commit 915014a

Please sign in to comment.