From d647a59a3ca1757898048b706f092f71ef632039 Mon Sep 17 00:00:00 2001 From: Kuruyia Date: Fri, 4 Oct 2024 16:31:27 +0200 Subject: [PATCH] docs: fix some inline code blocks --- doc/1/controllers/collection/list/index.md | 52 +++++++------- .../validate-specifications/index.md | 46 ++++++------ doc/1/core-classes/kuzzle/query/index.md | 71 +++++++++---------- 3 files changed, 83 insertions(+), 86 deletions(-) diff --git a/doc/1/controllers/collection/list/index.md b/doc/1/controllers/collection/list/index.md index d1d8b615..4f472105 100644 --- a/doc/1/controllers/collection/list/index.md +++ b/doc/1/controllers/collection/list/index.md @@ -22,10 +22,9 @@ public CompletableFuture> list( final String index) throws NotConnectedException, InternalException ``` - -| Arguments | Type | Description | -| --------- | ---------------------- | ------------- | -| `index` |
String
| Index name | +| Arguments | Type | Description | +| --------- | -------- | ----------- | +| `index` | `String` | Index name | ## Returns @@ -33,21 +32,21 @@ Returns a `Map` containing the following properties: | Property | Type | Description | | ------------- | ------------------- | ------------------------------------------------------------------ | -| `type` |
String
| Types of returned collections
(`all`, `realtime` or `stored`) | -| `collections` |
ArrayList | List of collections                                                |
-| `from`        | 
Integer
| Offset of the first result | -| `size` |
Integer
| Maximum number of returned results | +| `type` | `String` | Types of returned collections
(`all`, `realtime` or `stored`) | +| `collections` | `ArrayList` | List of collections | +| `from` | `Integer` | Offset of the first result | +| `size` | `Integer` | Maximum number of returned results | Each object in the `collections` array contains the following properties: -| Property | Type | Description | -| -------- | ----------------- | ---------------------------------------- | -| `name` |
String
| Collection name | -| `type` |
String
| Collection type (`realtime` or `stored`) | +| Property | Type | Description | +| -------- | -------- | ---------------------------------------- | +| `name` | `String` | Collection name | +| `type` | `String` | Collection type (`realtime` or `stored`) | ## Usage -<<< ./snippets/list-java.java +\<\<\< ./snippets/list-java.java ::: ::: tab Kotlin @@ -58,10 +57,9 @@ Each object in the `collections` array contains the following properties: fun list(index: String): CompletableFuture> ``` - -| Arguments | Type | Description | -| --------- | ---------------------- | ------------- | -| `index` |
String
| Index name | +| Arguments | Type | Description | +| --------- | -------- | ----------- | +| `index` | `String` | Index name | ## Returns @@ -69,21 +67,21 @@ Returns a `Map` containing the following properties: | Property | Type | Description | | ------------- | ------------------- | ------------------------------------------------------------------ | -| `type` |
String
| Types of returned collections
(`all`, `realtime` or `stored`) | -| `collections` |
ArrayList | List of collections                                                |
-| `from`        | 
Int
| Offset of the first result | -| `size` |
Int
| Maximum number of returned results | +| `type` | `String` | Types of returned collections
(`all`, `realtime` or `stored`) | +| `collections` | `ArrayList` | List of collections | +| `from` | `Int` | Offset of the first result | +| `size` | `Int` | Maximum number of returned results | Each object in the `collections` array contains the following properties: -| Property | Type | Description | -| -------- | ----------------- | ---------------------------------------- | -| `name` |
String
| Collection name | -| `type` |
String
| Collection type (`realtime` or `stored`) | +| Property | Type | Description | +| -------- | -------- | ---------------------------------------- | +| `name` | `String` | Collection name | +| `type` | `String` | Collection type (`realtime` or `stored`) | ## Usage -<<< ./snippets/list-kotlin.kt +\<\<\< ./snippets/list-kotlin.kt ::: -:::: \ No newline at end of file +:::: diff --git a/doc/1/controllers/collection/validate-specifications/index.md b/doc/1/controllers/collection/validate-specifications/index.md index de0e3830..ad96165e 100644 --- a/doc/1/controllers/collection/validate-specifications/index.md +++ b/doc/1/controllers/collection/validate-specifications/index.md @@ -27,11 +27,11 @@ When the validation specification is not formatted correctly, a detailed error m
-| Arguments | Type | Description | -| ---------------- | -------------------------------------------- | -------------------------- | -| `index` |
String
| Index name | -| `collection` |
String
| Collection name | -| `specifications` |
Map
| Specifications to validate | +| Arguments | Type | Description | +| ---------------- | --------------------- | -------------------------- | +| `index` | `String` | Index name | +| `collection` | `String` | Collection name | +| `specifications` | `Map` | Specifications to validate | ### specifications @@ -45,15 +45,15 @@ Returns a `Map` which contains information about the specificati It contains the following properties: -| Property | Type | Description | -| ------------- | ---------------------------- | ---------------------------- | -| `valid` |
Boolean
| Specifications validity | -| `details` |
ArrayList
| Specifications errors | -| `description` |
String
| Global description of errors | +| Property | Type | Description | +| ------------- | ------------------- | ---------------------------- | +| `valid` | `Boolean` | Specifications validity | +| `details` | `ArrayList` | Specifications errors | +| `description` | `String` | Global description of errors | ## Usage -<<< ./snippets/validate-specifications-java.java +\<\<\< ./snippets/validate-specifications-java.java ::: ::: tab Kotlin @@ -70,11 +70,11 @@ fun validateSpecifications(
-| Arguments | Type | Description | -| ---------------- | -------------------------------------------- | -------------------------- | -| `index` |
String
| Index name | -| `collection` |
String
| Collection name | -| `specifications` |
Map
| Specifications to validate | +| Arguments | Type | Description | +| ---------------- | ------------------- | -------------------------- | +| `index` | `String` | Index name | +| `collection` | `String` | Collection name | +| `specifications` | `Map` | Specifications to validate | ### specifications @@ -88,15 +88,15 @@ Returns a `Map` which contains information about the specification It contains the following properties: -| Property | Type | Description | -| ------------- | ---------------------------- | ---------------------------- | -| `valid` |
Boolean
| Specifications validity | -| `details` |
ArrayList
| Specifications errors | -| `description` |
String
| Global description of errors +| Property | Type | Description | +| ------------- | ------------------- | ---------------------------- | +| `valid` | `Boolean` | Specifications validity | +| `details` | `ArrayList` | Specifications errors | +| `description` | `String` | Global description of errors | ## Usage -<<< ./snippets/validate-specifications-kotlin.kt +\<\<\< ./snippets/validate-specifications-kotlin.kt ::: -:::: \ No newline at end of file +:::: diff --git a/doc/1/core-classes/kuzzle/query/index.md b/doc/1/core-classes/kuzzle/query/index.md index 23c2e512..9f706c0b 100644 --- a/doc/1/core-classes/kuzzle/query/index.md +++ b/doc/1/core-classes/kuzzle/query/index.md @@ -46,15 +46,15 @@ public CompletableFuture query(
-| Argument | Type | Description | -| -------- | ------------------------ | ----------- | -| `query` |
Map | API request |
+| Argument | Type                  | Description |
+| -------- | --------------------- | ----------- |
+| `query`  | `Map` | API request |
 
 
 
-| Argument | Type                                                                                        | Description |
-| -------- | ------------------------------------------------------------------------------------------- | ----------- |
-| `query`  | 
Map
or String
or RawJson
or RequestPayload
or Object
| API request | +| Argument | Type | Description | +| -------- | ------------------------------------------------------------------------ | ----------- | +| `query` | `Map`, `String`, `RawJson`, `RequestPayload` or `Object` | API request | ::: info Calling query with a `String` or `RawJson` makes no differences, and will be interpreted as raw json strings. @@ -74,17 +74,16 @@ This will avoid the deserialization + reserialization slowdown All properties necessary for the Kuzzle API can be added in the query object. The following properties are the most common. -| Property | Type | Description | -| ------------ | --------------------------------------------------------- | ---------------------------------------- | -| `controller` |
String
| Controller name (mandatory) | -| `action` |
String
| Action name (mandatory) | -| `body` |
Map
or RawJson
or Object
| Query body for this action | -| `index` |
String
| Index name for this action | -| `collection` |
String
| Collection name for this action | -| `_id` |
String
| id for this action | -| `volatile` |
Map
or RawJson
or Object
| Additional information to send to Kuzzle | -| `headers` |
Map
| Optionnal headers to send (HTTP Only) | - +| Property | Type | Description | +| ------------ | -------------------------------------------- | ---------------------------------------- | +| `controller` | `String` | Controller name (mandatory) | +| `action` | `String` | Action name (mandatory) | +| `body` | `Map`, `RawJson` or `Object` | Query body for this action | +| `index` | `String` | Index name for this action | +| `collection` | `String` | Collection name for this action | +| `_id` | `String` | id for this action | +| `volatile` | `Map`, `RawJson` or `Object` | Additional information to send to Kuzzle | +| `headers` | `Map` | Optionnal headers to send (HTTP Only) | ## Returns @@ -92,7 +91,7 @@ Returns a [Response](/sdk/jvm/1/core-classes/response) object which represents a ## Usage -<<< ./snippets/query-java.java +\<\<\< ./snippets/query-java.java ::: ::: tab Kotlin @@ -114,15 +113,15 @@ fun query(query: Any): CompletableFuture
-| Argument | Type | Description | -| -------- | ----------------------- | ----------- | -| `query` |
Map | API request |
+| Argument | Type                     | Description |
+| -------- | ------------------------ | ----------- |
+| `query`  | `Map`     | API request |
 
 
 
-| Argument | Type                                                                                    | Description |
-| -------- | --------------------------------------------------------------------------------------- | ----------- |
-| `query`  | 
Map
or RawJson
or String
or RequestPayload
or Any
| API request | +| Argument | Type | Description | +| -------- | -------------------------------------------------------------------- | ----------- | +| `query` | `Map`, `RawJson`, `String`, `RequestPayload` or `Any` | API request | ::: info Calling query with a `String` or `RawJson` makes no differences, and will be interpreted as raw json strings. @@ -142,16 +141,16 @@ This will avoid the deserialization + reserialization slowdown All properties necessary for the Kuzzle API can be added in the query object. The following properties are the most common. -| Property | Type | Description | -| ------------ | ---------------------------------------------------- | ---------------------------------------- | -| `controller` |
String
| Controller name (mandatory) | -| `action` |
String
| Action name (mandatory) | -| `body` |
Map
or RawJson
or Any
| Query body for this action | -| `index` |
String
| Index name for this action | -| `collection` |
String
| Collection name for this action | -| `_id` |
String
| id for this action | -| `volatile` |
Map
or RawJson
or Any
| Additional information to send to Kuzzle | -| `headers` |
Map
| Optionnal headers to send (HTTP Only) | +| Property | Type | Description | +| ------------ | ----------------------------------------- | ---------------------------------------- | +| `controller` | `String` | Controller name (mandatory) | +| `action` | `String` | Action name (mandatory) | +| `body` | `Map`, `RawJson` or `Any` | Query body for this action | +| `index` | `String` | Index name for this action | +| `collection` | `String` | Collection name for this action | +| `_id` | `String` | id for this action | +| `volatile` | `Map`, `RawJson` or `Any` | Additional information to send to Kuzzle | +| `headers` | `Map` | Optionnal headers to send (HTTP Only) | ## Returns @@ -159,7 +158,7 @@ Returns a [Response](/sdk/jvm/1/core-classes/response) object which represents a ## Usage -<<< ./snippets/query-kotlin.kt +\<\<\< ./snippets/query-kotlin.kt ::: -:::: \ No newline at end of file +::::