Skip to content

Commit

Permalink
docs: fix some inline code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuruyia committed Oct 4, 2024
1 parent 3233c03 commit d647a59
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 86 deletions.
52 changes: 25 additions & 27 deletions doc/1/controllers/collection/list/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,31 @@ public CompletableFuture<Map<String, Object>> list(
final String index) throws NotConnectedException, InternalException
```


| Arguments | Type | Description |
| --------- | ---------------------- | ------------- |
| `index` | <pre>String</pre> | Index name |
| Arguments | Type | Description |
| --------- | -------- | ----------- |
| `index` | `String` | Index name |

## Returns

Returns a `Map<String, Object>` containing the following properties:

| Property | Type | Description |
| ------------- | ------------------- | ------------------------------------------------------------------ |
| `type` | <pre>String</pre> | Types of returned collections <br/>(`all`, `realtime` or `stored`) |
| `collections` | <pre>ArrayList<Object></pre> | List of collections |
| `from` | <pre>Integer</pre> | Offset of the first result |
| `size` | <pre>Integer</pre> | Maximum number of returned results |
| `type` | `String` | Types of returned collections <br/>(`all`, `realtime` or `stored`) |
| `collections` | `ArrayList<Object>` | 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` | <pre>String</pre> | Collection name |
| `type` | <pre>String</pre> | 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
Expand All @@ -58,32 +57,31 @@ Each object in the `collections` array contains the following properties:
fun list(index: String): CompletableFuture<Map<String, Any?>>
```


| Arguments | Type | Description |
| --------- | ---------------------- | ------------- |
| `index` | <pre>String</pre> | Index name |
| Arguments | Type | Description |
| --------- | -------- | ----------- |
| `index` | `String` | Index name |

## Returns

Returns a `Map<String, Any?>` containing the following properties:

| Property | Type | Description |
| ------------- | ------------------- | ------------------------------------------------------------------ |
| `type` | <pre>String</pre> | Types of returned collections <br/>(`all`, `realtime` or `stored`) |
| `collections` | <pre>ArrayList<Object></pre> | List of collections |
| `from` | <pre>Int</pre> | Offset of the first result |
| `size` | <pre>Int</pre> | Maximum number of returned results |
| `type` | `String` | Types of returned collections <br/>(`all`, `realtime` or `stored`) |
| `collections` | `ArrayList<Object>` | 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` | <pre>String</pre> | Collection name |
| `type` | <pre>String</pre> | 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

:::
::::
::::
46 changes: 23 additions & 23 deletions doc/1/controllers/collection/validate-specifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ When the validation specification is not formatted correctly, a detailed error m

<br/>

| Arguments | Type | Description |
| ---------------- | -------------------------------------------- | -------------------------- |
| `index` | <pre>String</pre> | Index name |
| `collection` | <pre>String</pre> | Collection name |
| `specifications` | <pre>Map<String, Object></pre> | Specifications to validate |
| Arguments | Type | Description |
| ---------------- | --------------------- | -------------------------- |
| `index` | `String` | Index name |
| `collection` | `String` | Collection name |
| `specifications` | `Map<String, Object>` | Specifications to validate |

### specifications

Expand All @@ -45,15 +45,15 @@ Returns a `Map<String, Object>` which contains information about the specificati

It contains the following properties:

| Property | Type | Description |
| ------------- | ---------------------------- | ---------------------------- |
| `valid` | <pre>Boolean</pre> | Specifications validity |
| `details` | <pre>ArrayList<String></pre> | Specifications errors |
| `description` | <pre>String</pre> | Global description of errors |
| Property | Type | Description |
| ------------- | ------------------- | ---------------------------- |
| `valid` | `Boolean` | Specifications validity |
| `details` | `ArrayList<String>` | Specifications errors |
| `description` | `String` | Global description of errors |

## Usage

<<< ./snippets/validate-specifications-java.java
\<\<\< ./snippets/validate-specifications-java.java

:::
::: tab Kotlin
Expand All @@ -70,11 +70,11 @@ fun validateSpecifications(

<br/>

| Arguments | Type | Description |
| ---------------- | -------------------------------------------- | -------------------------- |
| `index` | <pre>String</pre> | Index name |
| `collection` | <pre>String</pre> | Collection name |
| `specifications` | <pre>Map<String, Any?></pre> | Specifications to validate |
| Arguments | Type | Description |
| ---------------- | ------------------- | -------------------------- |
| `index` | `String` | Index name |
| `collection` | `String` | Collection name |
| `specifications` | `Map<String, Any?>` | Specifications to validate |

### specifications

Expand All @@ -88,15 +88,15 @@ Returns a `Map<String, Any?>` which contains information about the specification

It contains the following properties:

| Property | Type | Description |
| ------------- | ---------------------------- | ---------------------------- |
| `valid` | <pre>Boolean</pre> | Specifications validity |
| `details` | <pre>ArrayList<String></pre> | Specifications errors |
| `description` | <pre>String</pre> | Global description of errors
| Property | Type | Description |
| ------------- | ------------------- | ---------------------------- |
| `valid` | `Boolean` | Specifications validity |
| `details` | `ArrayList<String>` | Specifications errors |
| `description` | `String` | Global description of errors |

## Usage

<<< ./snippets/validate-specifications-kotlin.kt
\<\<\< ./snippets/validate-specifications-kotlin.kt

:::
::::
::::
71 changes: 35 additions & 36 deletions doc/1/core-classes/kuzzle/query/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ public CompletableFuture<Response> query(

<br/>

| Argument | Type | Description |
| -------- | ------------------------ | ----------- |
| `query` | <pre>Map<String, Object> | API request |
| Argument | Type | Description |
| -------- | --------------------- | ----------- |
| `query` | `Map<String, Object>` | API request |

<SinceBadge version="1.2.3"/>

| Argument | Type | Description |
| -------- | ------------------------------------------------------------------------------------------- | ----------- |
| `query` | <pre>Map<String, Object><br>or String<br>or RawJson<br>or RequestPayload<br>or Object</pre> | API request |
| Argument | Type | Description |
| -------- | ------------------------------------------------------------------------ | ----------- |
| `query` | `Map<String, Object>`, `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.
Expand All @@ -74,25 +74,24 @@ 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` | <pre>String</pre> | Controller name (mandatory) |
| `action` | <pre>String</pre> | Action name (mandatory) |
| `body` | <pre>Map<String, Object><br>or RawJson<br>or Object</pre> | Query body for this action |
| `index` | <pre>String</pre> | Index name for this action |
| `collection` | <pre>String</pre> | Collection name for this action |
| `_id` | <pre>String</pre> | id for this action |
| `volatile` | <pre>Map<String, Object><br>or RawJson<br>or Object</pre> | Additional information to send to Kuzzle |
| `headers` | <pre>Map<String, Object></pre> | Optionnal headers to send (HTTP Only) |

| Property | Type | Description |
| ------------ | -------------------------------------------- | ---------------------------------------- |
| `controller` | `String` | Controller name (mandatory) |
| `action` | `String` | Action name (mandatory) |
| `body` | `Map<String, Object>`, `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<String, Object>`, `RawJson` or `Object` | Additional information to send to Kuzzle |
| `headers` | `Map<String, Object>` | Optionnal headers to send (HTTP Only) |

## Returns

Returns a [Response](/sdk/jvm/1/core-classes/response) object which represents a raw Kuzzle API response. See the [API Documentation](/core/2/api).

## Usage

<<< ./snippets/query-java.java
\<\<\< ./snippets/query-java.java

:::
::: tab Kotlin
Expand All @@ -114,15 +113,15 @@ fun query(query: Any): CompletableFuture<Response>

<br/>

| Argument | Type | Description |
| -------- | ----------------------- | ----------- |
| `query` | <pre>Map<String?, Any?> | API request |
| Argument | Type | Description |
| -------- | ------------------------ | ----------- |
| `query` | `Map<String?, Any?>` | API request |

<SinceBadge version="1.2.3"/>

| Argument | Type | Description |
| -------- | --------------------------------------------------------------------------------------- | ----------- |
| `query` | <pre>Map<String?, Any?><br>or RawJson<br>or String<br>or RequestPayload<br>or Any</pre> | API request |
| Argument | Type | Description |
| -------- | -------------------------------------------------------------------- | ----------- |
| `query` | `Map<String?, Any?>`, `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.
Expand All @@ -142,24 +141,24 @@ 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` | <pre>String</pre> | Controller name (mandatory) |
| `action` | <pre>String</pre> | Action name (mandatory) |
| `body` | <pre>Map<String, Any?><br>or RawJson<br>or Any</pre> | Query body for this action |
| `index` | <pre>String</pre> | Index name for this action |
| `collection` | <pre>String</pre> | Collection name for this action |
| `_id` | <pre>String</pre> | id for this action |
| `volatile` | <pre>Map<String, Any?><br>or RawJson<br>or Any</pre> | Additional information to send to Kuzzle |
| `headers` | <pre>Map<String, Any?></pre> | Optionnal headers to send (HTTP Only) |
| Property | Type | Description |
| ------------ | ----------------------------------------- | ---------------------------------------- |
| `controller` | `String` | Controller name (mandatory) |
| `action` | `String` | Action name (mandatory) |
| `body` | `Map<String, Object>`, `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<String, Object>`, `RawJson` or `Any` | Additional information to send to Kuzzle |
| `headers` | `Map<String, Any?>` | Optionnal headers to send (HTTP Only) |

## Returns

Returns a [Response](/sdk/jvm/1/core-classes/response) object which represents a raw Kuzzle API response. See the [API Documentation](/core/2/api).

## Usage

<<< ./snippets/query-kotlin.kt
\<\<\< ./snippets/query-kotlin.kt

:::
::::
::::

0 comments on commit d647a59

Please sign in to comment.