Browse Source

Small config schema improvements, update docs

Leszek Wiesner 3 years ago
parent
commit
fbc53c8917
46 changed files with 972 additions and 360 deletions
  1. 4 4
      distributor-node/docs/node/index.md
  2. 0 3
      distributor-node/docs/schema/definition-properties-directories-properties-logs.md
  3. 6 25
      distributor-node/docs/schema/definition-properties-directories.md
  4. 0 3
      distributor-node/docs/schema/definition-properties-endpoints-properties-elasticsearch.md
  5. 6 25
      distributor-node/docs/schema/definition-properties-endpoints.md
  6. 8 8
      distributor-node/docs/schema/definition-properties-intervals.md
  7. 4 4
      distributor-node/docs/schema/definition-properties-keys-items-oneof-json-backup-file.md
  8. 6 6
      distributor-node/docs/schema/definition-properties-keys-items-oneof-mnemonic-phrase.md
  9. 6 6
      distributor-node/docs/schema/definition-properties-keys-items-oneof-substrate-uri.md
  10. 8 0
      distributor-node/docs/schema/definition-properties-limits-properties-dataobjectsourcebyobjectidttl.md
  11. 25 17
      distributor-node/docs/schema/definition-properties-limits.md
  12. 0 18
      distributor-node/docs/schema/definition-properties-log-properties-elastic.md
  13. 0 110
      distributor-node/docs/schema/definition-properties-log.md
  14. 41 0
      distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-0.md
  15. 11 0
      distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-1.md
  16. 41 0
      distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-console-logging-options.md
  17. 9 0
      distributor-node/docs/schema/definition-properties-logs-properties-console.md
  18. 3 0
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-0-properties-endpoint.md
  19. 60 0
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-0.md
  20. 11 0
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-1.md
  21. 3 0
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md
  22. 60 0
      distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md
  23. 9 0
      distributor-node/docs/schema/definition-properties-logs-properties-elastic.md
  24. 3 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-archive.md
  25. 22 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-frequency.md
  26. 2 3
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-level.md
  27. 7 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-maxfiles.md
  28. 7 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-maxsize.md
  29. 3 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-path.md
  30. 163 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0.md
  31. 11 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-1.md
  32. 3 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md
  33. 22 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md
  34. 2 3
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md
  35. 7 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxfiles.md
  36. 7 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md
  37. 3 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md
  38. 163 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options.md
  39. 11 0
      distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-switch-off.md
  40. 9 0
      distributor-node/docs/schema/definition-properties-logs-properties-file.md
  41. 83 0
      distributor-node/docs/schema/definition-properties-logs.md
  42. 28 28
      distributor-node/docs/schema/definition.md
  43. 63 87
      distributor-node/src/schemas/configSchema.ts
  44. 4 1
      distributor-node/src/schemas/scripts/generateTypes.ts
  45. 14 0
      distributor-node/src/schemas/utils.ts
  46. 14 9
      distributor-node/src/types/generated/ConfigJson.d.ts

+ 4 - 4
distributor-node/docs/node/index.md

@@ -378,10 +378,10 @@ No-longer-distributed data objects are dropped from the cache periodically every
 
 The distributor node supports detailed logging with [winston](https://www.npmjs.com/package/winston) library. [NPM log levels](https://www.npmjs.com/package/winston#logging-levels) are used to specify the log priority.
 
-The logs can be directed to some of the 3 available outputs, depending on the [`log`](../schema/definition-properties-log.md) configuration settings:
-- console
-- a log file inside [`directories.logs`](../schema/definition-properties-directories.md#logs)
-- an elasticsearch endpoint specified via [`endpoints.elasticsearch`](../schema/definition-properties-endpoints.md#elasticsearch)
+The logs can be directed to some of the 3 available outputs, depending on the [`logs`](../schema/definition-properties-logs.md) configuration settings:
+- console ([`logs.console`](../schema/definition-properties-logs-properties-console.md))
+- log file(s) ([`logs.file`](../schema/definition-properties-logs-properties-file.md))
+- an elasticsearch endpoint ([`logs.elastic`](../schema/definition-properties-logs-properties-elastic.md))
 
 # Query node integration
 

+ 0 - 3
distributor-node/docs/schema/definition-properties-directories-properties-logs.md

@@ -1,3 +0,0 @@
-## logs Type
-
-`string`

+ 6 - 25
distributor-node/docs/schema/definition-properties-directories.md

@@ -4,11 +4,10 @@
 
 # directories Properties
 
-| Property                  | Type     | Required | Nullable       | Defined by                                                                                                                                             |
-| :------------------------ | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [assets](#assets)         | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-directories-properties-assets.md "undefined#/properties/directories/properties/assets")         |
-| [cacheState](#cachestate) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-directories-properties-cachestate.md "undefined#/properties/directories/properties/cacheState") |
-| [logs](#logs)             | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-directories-properties-logs.md "undefined#/properties/directories/properties/logs")             |
+| Property                  | Type     | Required | Nullable       | Defined by                                                                                                                                                                              |
+| :------------------------ | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [assets](#assets)         | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-directories-properties-assets.md "https://joystream.org/schemas/argus/config#/properties/directories/properties/assets")         |
+| [cacheState](#cachestate) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-directories-properties-cachestate.md "https://joystream.org/schemas/argus/config#/properties/directories/properties/cacheState") |
 
 ## assets
 
@@ -22,7 +21,7 @@ Path to a directory where all the cached assets will be stored
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-directories-properties-assets.md "undefined#/properties/directories/properties/assets")
+*   defined in: [Distributor node configuration](definition-properties-directories-properties-assets.md "https://joystream.org/schemas/argus/config#/properties/directories/properties/assets")
 
 ### assets Type
 
@@ -40,26 +39,8 @@ Path to a directory where information about the current cache state will be stor
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-directories-properties-cachestate.md "undefined#/properties/directories/properties/cacheState")
+*   defined in: [Distributor node configuration](definition-properties-directories-properties-cachestate.md "https://joystream.org/schemas/argus/config#/properties/directories/properties/cacheState")
 
 ### cacheState Type
 
 `string`
-
-## logs
-
-Path to a directory where logs will be stored if logging to a file was enabled (via `log.file`).
-
-`logs`
-
-*   is optional
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-directories-properties-logs.md "undefined#/properties/directories/properties/logs")
-
-### logs Type
-
-`string`

+ 0 - 3
distributor-node/docs/schema/definition-properties-endpoints-properties-elasticsearch.md

@@ -1,3 +0,0 @@
-## elasticSearch Type
-
-`string`

+ 6 - 25
distributor-node/docs/schema/definition-properties-endpoints.md

@@ -4,11 +4,10 @@
 
 # endpoints Properties
 
-| Property                            | Type     | Required | Nullable       | Defined by                                                                                                                                                   |
-| :---------------------------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [queryNode](#querynode)             | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-endpoints-properties-querynode.md "undefined#/properties/endpoints/properties/queryNode")             |
-| [joystreamNodeWs](#joystreamnodews) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-endpoints-properties-joystreamnodews.md "undefined#/properties/endpoints/properties/joystreamNodeWs") |
-| [elasticSearch](#elasticsearch)     | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-endpoints-properties-elasticsearch.md "undefined#/properties/endpoints/properties/elasticSearch")     |
+| Property                            | Type     | Required | Nullable       | Defined by                                                                                                                                                                                    |
+| :---------------------------------- | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [queryNode](#querynode)             | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-endpoints-properties-querynode.md "https://joystream.org/schemas/argus/config#/properties/endpoints/properties/queryNode")             |
+| [joystreamNodeWs](#joystreamnodews) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-endpoints-properties-joystreamnodews.md "https://joystream.org/schemas/argus/config#/properties/endpoints/properties/joystreamNodeWs") |
 
 ## queryNode
 
@@ -22,7 +21,7 @@ Query node graphql server uri (for example: <http://localhost:8081/graphql>)
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-endpoints-properties-querynode.md "undefined#/properties/endpoints/properties/queryNode")
+*   defined in: [Distributor node configuration](definition-properties-endpoints-properties-querynode.md "https://joystream.org/schemas/argus/config#/properties/endpoints/properties/queryNode")
 
 ### queryNode Type
 
@@ -40,26 +39,8 @@ Joystream node websocket api uri (for example: ws\://localhost:9944)
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-endpoints-properties-joystreamnodews.md "undefined#/properties/endpoints/properties/joystreamNodeWs")
+*   defined in: [Distributor node configuration](definition-properties-endpoints-properties-joystreamnodews.md "https://joystream.org/schemas/argus/config#/properties/endpoints/properties/joystreamNodeWs")
 
 ### joystreamNodeWs Type
 
 `string`
-
-## elasticSearch
-
-Elasticsearch uri used for submitting the distributor node logs (if enabled via `log.elastic`)
-
-`elasticSearch`
-
-*   is optional
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-endpoints-properties-elasticsearch.md "undefined#/properties/endpoints/properties/elasticSearch")
-
-### elasticSearch Type
-
-`string`

+ 8 - 8
distributor-node/docs/schema/definition-properties-intervals.md

@@ -4,11 +4,11 @@
 
 # intervals Properties
 
-| Property                                                        | Type      | Required | Nullable       | Defined by                                                                                                                                                                               |
-| :-------------------------------------------------------------- | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [saveCacheState](#savecachestate)                               | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-intervals-properties-savecachestate.md "undefined#/properties/intervals/properties/saveCacheState")                               |
-| [checkStorageNodeResponseTimes](#checkstoragenoderesponsetimes) | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-intervals-properties-checkstoragenoderesponsetimes.md "undefined#/properties/intervals/properties/checkStorageNodeResponseTimes") |
-| [cacheCleanup](#cachecleanup)                                   | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-intervals-properties-cachecleanup.md "undefined#/properties/intervals/properties/cacheCleanup")                                   |
+| Property                                                        | Type      | Required | Nullable       | Defined by                                                                                                                                                                                                                |
+| :-------------------------------------------------------------- | :-------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| [saveCacheState](#savecachestate)                               | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-intervals-properties-savecachestate.md "https://joystream.org/schemas/argus/config#/properties/intervals/properties/saveCacheState")                               |
+| [checkStorageNodeResponseTimes](#checkstoragenoderesponsetimes) | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-intervals-properties-checkstoragenoderesponsetimes.md "https://joystream.org/schemas/argus/config#/properties/intervals/properties/checkStorageNodeResponseTimes") |
+| [cacheCleanup](#cachecleanup)                                   | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-intervals-properties-cachecleanup.md "https://joystream.org/schemas/argus/config#/properties/intervals/properties/cacheCleanup")                                   |
 
 ## saveCacheState
 
@@ -22,7 +22,7 @@ How often, in seconds, will the cache state be saved in `directories.state`. Ind
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-intervals-properties-savecachestate.md "undefined#/properties/intervals/properties/saveCacheState")
+*   defined in: [Distributor node configuration](definition-properties-intervals-properties-savecachestate.md "https://joystream.org/schemas/argus/config#/properties/intervals/properties/saveCacheState")
 
 ### saveCacheState Type
 
@@ -44,7 +44,7 @@ How often, in seconds, will the distributor node attempt to send requests to all
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-intervals-properties-checkstoragenoderesponsetimes.md "undefined#/properties/intervals/properties/checkStorageNodeResponseTimes")
+*   defined in: [Distributor node configuration](definition-properties-intervals-properties-checkstoragenoderesponsetimes.md "https://joystream.org/schemas/argus/config#/properties/intervals/properties/checkStorageNodeResponseTimes")
 
 ### checkStorageNodeResponseTimes Type
 
@@ -66,7 +66,7 @@ How often, in seconds, will the distributor node fetch data about all its distri
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-intervals-properties-cachecleanup.md "undefined#/properties/intervals/properties/cacheCleanup")
+*   defined in: [Distributor node configuration](definition-properties-intervals-properties-cachecleanup.md "https://joystream.org/schemas/argus/config#/properties/intervals/properties/cacheCleanup")
 
 ### cacheCleanup Type
 

+ 4 - 4
distributor-node/docs/schema/definition-properties-keys-items-oneof-json-backup-file.md

@@ -4,9 +4,9 @@
 
 # 2 Properties
 
-| Property            | Type     | Required | Nullable       | Defined by                                                                                                                                                                    |
-| :------------------ | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [keyfile](#keyfile) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-json-backup-file-properties-keyfile.md "undefined#/properties/keys/items/oneOf/2/properties/keyfile") |
+| Property            | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                     |
+| :------------------ | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [keyfile](#keyfile) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-json-backup-file-properties-keyfile.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/2/properties/keyfile") |
 
 ## keyfile
 
@@ -20,7 +20,7 @@
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-json-backup-file-properties-keyfile.md "undefined#/properties/keys/items/oneOf/2/properties/keyfile")
+*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-json-backup-file-properties-keyfile.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/2/properties/keyfile")
 
 ### keyfile Type
 

+ 6 - 6
distributor-node/docs/schema/definition-properties-keys-items-oneof-mnemonic-phrase.md

@@ -4,10 +4,10 @@
 
 # 1 Properties
 
-| Property              | Type     | Required | Nullable       | Defined by                                                                                                                                                                     |
-| :-------------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [type](#type)         | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-type.md "undefined#/properties/keys/items/oneOf/1/properties/type")         |
-| [mnemonic](#mnemonic) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-mnemonic.md "undefined#/properties/keys/items/oneOf/1/properties/mnemonic") |
+| Property              | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                      |
+| :-------------------- | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [type](#type)         | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-type.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/1/properties/type")         |
+| [mnemonic](#mnemonic) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-mnemonic.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/1/properties/mnemonic") |
 
 ## type
 
@@ -21,7 +21,7 @@
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-type.md "undefined#/properties/keys/items/oneOf/1/properties/type")
+*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-type.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/1/properties/type")
 
 ### type Type
 
@@ -57,7 +57,7 @@ The default value is:
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-mnemonic.md "undefined#/properties/keys/items/oneOf/1/properties/mnemonic")
+*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-mnemonic-phrase-properties-mnemonic.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/1/properties/mnemonic")
 
 ### mnemonic Type
 

+ 6 - 6
distributor-node/docs/schema/definition-properties-keys-items-oneof-substrate-uri.md

@@ -4,10 +4,10 @@
 
 # 0 Properties
 
-| Property      | Type     | Required | Nullable       | Defined by                                                                                                                                                           |
-| :------------ | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [type](#type) | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-type.md "undefined#/properties/keys/items/oneOf/0/properties/type") |
-| [suri](#suri) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-suri.md "undefined#/properties/keys/items/oneOf/0/properties/suri") |
+| Property      | Type     | Required | Nullable       | Defined by                                                                                                                                                                                            |
+| :------------ | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [type](#type) | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-type.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/0/properties/type") |
+| [suri](#suri) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-suri.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/0/properties/suri") |
 
 ## type
 
@@ -21,7 +21,7 @@
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-type.md "undefined#/properties/keys/items/oneOf/0/properties/type")
+*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-type.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/0/properties/type")
 
 ### type Type
 
@@ -57,7 +57,7 @@ The default value is:
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-suri.md "undefined#/properties/keys/items/oneOf/0/properties/suri")
+*   defined in: [Distributor node configuration](definition-properties-keys-items-oneof-substrate-uri-properties-suri.md "https://joystream.org/schemas/argus/config#/properties/keys/items/oneOf/0/properties/suri")
 
 ### suri Type
 

+ 8 - 0
distributor-node/docs/schema/definition-properties-limits-properties-dataobjectsourcebyobjectidttl.md

@@ -5,3 +5,11 @@
 ## dataObjectSourceByObjectIdTTL Constraints
 
 **minimum**: the value of this number must greater than or equal to: `1`
+
+## dataObjectSourceByObjectIdTTL Default Value
+
+The default value is:
+
+```json
+60
+```

+ 25 - 17
distributor-node/docs/schema/definition-properties-limits.md

@@ -4,15 +4,15 @@
 
 # limits Properties
 
-| Property                                                                | Type      | Required | Nullable       | Defined by                                                                                                                                                                                 |
-| :---------------------------------------------------------------------- | :-------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [storage](#storage)                                                     | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-storage.md "undefined#/properties/limits/properties/storage")                                                     |
-| [maxConcurrentStorageNodeDownloads](#maxconcurrentstoragenodedownloads) | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-maxconcurrentstoragenodedownloads.md "undefined#/properties/limits/properties/maxConcurrentStorageNodeDownloads") |
-| [maxConcurrentOutboundConnections](#maxconcurrentoutboundconnections)   | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-maxconcurrentoutboundconnections.md "undefined#/properties/limits/properties/maxConcurrentOutboundConnections")   |
-| [outboundRequestsTimeoutMs](#outboundrequeststimeoutms)                 | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-outboundrequeststimeoutms.md "undefined#/properties/limits/properties/outboundRequestsTimeoutMs")                 |
-| [pendingDownloadTimeoutSec](#pendingdownloadtimeoutsec)                 | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-pendingdownloadtimeoutsec.md "undefined#/properties/limits/properties/pendingDownloadTimeoutSec")                 |
-| [maxCachedItemSize](#maxcacheditemsize)                                 | `string`  | Optional | cannot be null | [Distributor node configuration](definition-properties-limits-properties-maxcacheditemsize.md "undefined#/properties/limits/properties/maxCachedItemSize")                                 |
-| [dataObjectSourceByObjectIdTTL](#dataobjectsourcebyobjectidttl)         | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-limits-properties-dataobjectsourcebyobjectidttl.md "undefined#/properties/limits/properties/dataObjectSourceByObjectIdTTL")         |
+| Property                                                                | Type      | Required | Nullable       | Defined by                                                                                                                                                                                                                  |
+| :---------------------------------------------------------------------- | :-------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [storage](#storage)                                                     | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-storage.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/storage")                                                     |
+| [maxConcurrentStorageNodeDownloads](#maxconcurrentstoragenodedownloads) | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-maxconcurrentstoragenodedownloads.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/maxConcurrentStorageNodeDownloads") |
+| [maxConcurrentOutboundConnections](#maxconcurrentoutboundconnections)   | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-maxconcurrentoutboundconnections.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/maxConcurrentOutboundConnections")   |
+| [outboundRequestsTimeoutMs](#outboundrequeststimeoutms)                 | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-outboundrequeststimeoutms.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/outboundRequestsTimeoutMs")                 |
+| [pendingDownloadTimeoutSec](#pendingdownloadtimeoutsec)                 | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-limits-properties-pendingdownloadtimeoutsec.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/pendingDownloadTimeoutSec")                 |
+| [maxCachedItemSize](#maxcacheditemsize)                                 | `string`  | Optional | cannot be null | [Distributor node configuration](definition-properties-limits-properties-maxcacheditemsize.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/maxCachedItemSize")                                 |
+| [dataObjectSourceByObjectIdTTL](#dataobjectsourcebyobjectidttl)         | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-limits-properties-dataobjectsourcebyobjectidttl.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/dataObjectSourceByObjectIdTTL")         |
 
 ## storage
 
@@ -26,7 +26,7 @@ Maximum total size of all (cached) assets stored in `directories.assets`
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits-properties-storage.md "undefined#/properties/limits/properties/storage")
+*   defined in: [Distributor node configuration](definition-properties-limits-properties-storage.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/storage")
 
 ### storage Type
 
@@ -54,7 +54,7 @@ Maximum number of concurrent downloads from the storage node(s)
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits-properties-maxconcurrentstoragenodedownloads.md "undefined#/properties/limits/properties/maxConcurrentStorageNodeDownloads")
+*   defined in: [Distributor node configuration](definition-properties-limits-properties-maxconcurrentstoragenodedownloads.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/maxConcurrentStorageNodeDownloads")
 
 ### maxConcurrentStorageNodeDownloads Type
 
@@ -76,7 +76,7 @@ Maximum number of total simultaneous outbound connections to storage node(s) (ex
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits-properties-maxconcurrentoutboundconnections.md "undefined#/properties/limits/properties/maxConcurrentOutboundConnections")
+*   defined in: [Distributor node configuration](definition-properties-limits-properties-maxconcurrentoutboundconnections.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/maxConcurrentOutboundConnections")
 
 ### maxConcurrentOutboundConnections Type
 
@@ -98,7 +98,7 @@ Timeout for all outbound storage node http requests in miliseconds
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits-properties-outboundrequeststimeoutms.md "undefined#/properties/limits/properties/outboundRequestsTimeoutMs")
+*   defined in: [Distributor node configuration](definition-properties-limits-properties-outboundrequeststimeoutms.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/outboundRequestsTimeoutMs")
 
 ### outboundRequestsTimeoutMs Type
 
@@ -120,7 +120,7 @@ Timeout for pending storage node downloads in seconds
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits-properties-pendingdownloadtimeoutsec.md "undefined#/properties/limits/properties/pendingDownloadTimeoutSec")
+*   defined in: [Distributor node configuration](definition-properties-limits-properties-pendingdownloadtimeoutsec.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/pendingDownloadTimeoutSec")
 
 ### pendingDownloadTimeoutSec Type
 
@@ -142,7 +142,7 @@ Maximum size of a data object allowed to be cached by the node
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits-properties-maxcacheditemsize.md "undefined#/properties/limits/properties/maxCachedItemSize")
+*   defined in: [Distributor node configuration](definition-properties-limits-properties-maxcacheditemsize.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/maxCachedItemSize")
 
 ### maxCachedItemSize Type
 
@@ -160,7 +160,7 @@ Maximum size of a data object allowed to be cached by the node
 
 ## dataObjectSourceByObjectIdTTL
 
-TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects of size greater than maxCachedItemSize to the right storage node. Defaults to `60` if not specified.
+TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects of size greater than maxCachedItemSize to the right storage node.
 
 `dataObjectSourceByObjectIdTTL`
 
@@ -170,7 +170,7 @@ TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits-properties-dataobjectsourcebyobjectidttl.md "undefined#/properties/limits/properties/dataObjectSourceByObjectIdTTL")
+*   defined in: [Distributor node configuration](definition-properties-limits-properties-dataobjectsourcebyobjectidttl.md "https://joystream.org/schemas/argus/config#/properties/limits/properties/dataObjectSourceByObjectIdTTL")
 
 ### dataObjectSourceByObjectIdTTL Type
 
@@ -179,3 +179,11 @@ TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects
 ### dataObjectSourceByObjectIdTTL Constraints
 
 **minimum**: the value of this number must greater than or equal to: `1`
+
+### dataObjectSourceByObjectIdTTL Default Value
+
+The default value is:
+
+```json
+60
+```

+ 0 - 18
distributor-node/docs/schema/definition-properties-log-properties-elastic.md

@@ -1,18 +0,0 @@
-## elastic Type
-
-`string`
-
-## elastic Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |
-| `"off"`     |             |

+ 0 - 110
distributor-node/docs/schema/definition-properties-log.md

@@ -1,110 +0,0 @@
-## log Type
-
-`object` ([Details](definition-properties-log.md))
-
-# log Properties
-
-| Property            | Type     | Required | Nullable       | Defined by                                                                                                                       |
-| :------------------ | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------- |
-| [file](#file)       | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-log-properties-file.md "undefined#/properties/log/properties/file")       |
-| [console](#console) | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-log-properties-console.md "undefined#/properties/log/properties/console") |
-| [elastic](#elastic) | `string` | Optional | cannot be null | [Distributor node configuration](definition-properties-log-properties-elastic.md "undefined#/properties/log/properties/elastic") |
-
-## file
-
-Minimum level of logs written to a file specified in `directories.logs`
-
-`file`
-
-*   is optional
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-log-properties-file.md "undefined#/properties/log/properties/file")
-
-### file Type
-
-`string`
-
-### file Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |
-| `"off"`     |             |
-
-## console
-
-Minimum level of logs outputted to a console
-
-`console`
-
-*   is optional
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-log-properties-console.md "undefined#/properties/log/properties/console")
-
-### console Type
-
-`string`
-
-### console Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |
-| `"off"`     |             |
-
-## elastic
-
-Minimum level of logs sent to elasticsearch endpoint specified in `endpoints.elasticSearch`
-
-`elastic`
-
-*   is optional
-
-*   Type: `string`
-
-*   cannot be null
-
-*   defined in: [Distributor node configuration](definition-properties-log-properties-elastic.md "undefined#/properties/log/properties/elastic")
-
-### elastic Type
-
-`string`
-
-### elastic Constraints
-
-**enum**: the value of this property must be equal to one of the following values:
-
-| Value       | Explanation |
-| :---------- | :---------- |
-| `"error"`   |             |
-| `"warn"`    |             |
-| `"info"`    |             |
-| `"http"`    |             |
-| `"verbose"` |             |
-| `"debug"`   |             |
-| `"silly"`   |             |
-| `"off"`     |             |

+ 41 - 0
distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-0.md

@@ -0,0 +1,41 @@
+## 0 Type
+
+`object` ([Details](definition-properties-logs-properties-console-oneof-0.md))
+
+# 0 Properties
+
+| Property        | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                         |
+| :-------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [level](#level) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level") |
+
+## level
+
+Minimum level of logs sent to this output
+
+`level`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level")
+
+### level Type
+
+`string`
+
+### level Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"error"`   |             |
+| `"warn"`    |             |
+| `"info"`    |             |
+| `"http"`    |             |
+| `"verbose"` |             |
+| `"debug"`   |             |
+| `"silly"`   |             |

+ 11 - 0
distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-1.md

@@ -0,0 +1,11 @@
+## 1 Type
+
+`string`
+
+## 1 Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value   | Explanation |
+| :------ | :---------- |
+| `"off"` |             |

+ 41 - 0
distributor-node/docs/schema/definition-properties-logs-properties-console-oneof-console-logging-options.md

@@ -0,0 +1,41 @@
+## 0 Type
+
+`object` ([Console logging options](definition-properties-logs-properties-console-oneof-console-logging-options.md))
+
+# 0 Properties
+
+| Property        | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                                            |
+| :-------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| [level](#level) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level") |
+
+## level
+
+Minimum level of logs sent to this output
+
+`level`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console/oneOf/0/properties/level")
+
+### level Type
+
+`string`
+
+### level Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"error"`   |             |
+| `"warn"`    |             |
+| `"info"`    |             |
+| `"http"`    |             |
+| `"verbose"` |             |
+| `"debug"`   |             |
+| `"silly"`   |             |

+ 9 - 0
distributor-node/docs/schema/definition-properties-logs-properties-console.md

@@ -0,0 +1,9 @@
+## console Type
+
+merged type ([Details](definition-properties-logs-properties-console.md))
+
+one (and only one) of
+
+*   [Console logging options](definition-properties-logs-properties-console-oneof-console-logging-options.md "check type definition")
+
+*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")

+ 3 - 0
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-0-properties-endpoint.md

@@ -0,0 +1,3 @@
+## endpoint Type
+
+`string`

+ 60 - 0
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-0.md

@@ -0,0 +1,60 @@
+## 0 Type
+
+`object` ([Details](definition-properties-logs-properties-elastic-oneof-0.md))
+
+# 0 Properties
+
+| Property              | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                                  |
+| :-------------------- | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [level](#level)       | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")          |
+| [endpoint](#endpoint) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-0-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint") |
+
+## level
+
+Minimum level of logs sent to this output
+
+`level`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")
+
+### level Type
+
+`string`
+
+### level Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"error"`   |             |
+| `"warn"`    |             |
+| `"info"`    |             |
+| `"http"`    |             |
+| `"verbose"` |             |
+| `"debug"`   |             |
+| `"silly"`   |             |
+
+## endpoint
+
+Elastichsearch endpoint to push the logs to (for example: <http://localhost:9200>)
+
+`endpoint`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-0-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint")
+
+### endpoint Type
+
+`string`

+ 11 - 0
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-1.md

@@ -0,0 +1,11 @@
+## 1 Type
+
+`string`
+
+## 1 Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value   | Explanation |
+| :------ | :---------- |
+| `"off"` |             |

+ 3 - 0
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md

@@ -0,0 +1,3 @@
+## endpoint Type
+
+`string`

+ 60 - 0
distributor-node/docs/schema/definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md

@@ -0,0 +1,60 @@
+## 0 Type
+
+`object` ([Elasticsearch logging options](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md))
+
+# 0 Properties
+
+| Property              | Type     | Required | Nullable       | Defined by                                                                                                                                                                                                                                              |
+| :-------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| [level](#level)       | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")                   |
+| [endpoint](#endpoint) | `string` | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint") |
+
+## level
+
+Minimum level of logs sent to this output
+
+`level`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/level")
+
+### level Type
+
+`string`
+
+### level Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"error"`   |             |
+| `"warn"`    |             |
+| `"info"`    |             |
+| `"http"`    |             |
+| `"verbose"` |             |
+| `"debug"`   |             |
+| `"silly"`   |             |
+
+## endpoint
+
+Elastichsearch endpoint to push the logs to (for example: <http://localhost:9200>)
+
+`endpoint`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options-properties-endpoint.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic/oneOf/0/properties/endpoint")
+
+### endpoint Type
+
+`string`

+ 9 - 0
distributor-node/docs/schema/definition-properties-logs-properties-elastic.md

@@ -0,0 +1,9 @@
+## elastic Type
+
+merged type ([Details](definition-properties-logs-properties-elastic.md))
+
+one (and only one) of
+
+*   [Elasticsearch logging options](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md "check type definition")
+
+*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")

+ 3 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-archive.md

@@ -0,0 +1,3 @@
+## archive Type
+
+`boolean`

+ 22 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-frequency.md

@@ -0,0 +1,22 @@
+## frequency Type
+
+`string`
+
+## frequency Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"yearly"`  |             |
+| `"monthly"` |             |
+| `"daily"`   |             |
+| `"hourly"`  |             |
+
+## frequency Default Value
+
+The default value is:
+
+```json
+"daily"
+```

+ 2 - 3
distributor-node/docs/schema/definition-properties-log-properties-file.md → distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-level.md

@@ -1,8 +1,8 @@
-## file Type
+## level Type
 
 `string`
 
-## file Constraints
+## level Constraints
 
 **enum**: the value of this property must be equal to one of the following values:
 
@@ -15,4 +15,3 @@
 | `"verbose"` |             |
 | `"debug"`   |             |
 | `"silly"`   |             |
-| `"off"`     |             |

+ 7 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-maxfiles.md

@@ -0,0 +1,7 @@
+## maxFiles Type
+
+`integer`
+
+## maxFiles Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1`

+ 7 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-maxsize.md

@@ -0,0 +1,7 @@
+## maxSize Type
+
+`integer`
+
+## maxSize Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1024`

+ 3 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0-properties-path.md

@@ -0,0 +1,3 @@
+## path Type
+
+`string`

+ 163 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-0.md

@@ -0,0 +1,163 @@
+## 0 Type
+
+`object` ([Details](definition-properties-logs-properties-file-oneof-0.md))
+
+# 0 Properties
+
+| Property                | Type      | Required | Nullable       | Defined by                                                                                                                                                                                                              |
+| :---------------------- | :-------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [level](#level)         | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")         |
+| [path](#path)           | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")           |
+| [maxFiles](#maxfiles)   | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")   |
+| [maxSize](#maxsize)     | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")     |
+| [frequency](#frequency) | `string`  | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency") |
+| [archive](#archive)     | `boolean` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")     |
+
+## level
+
+Minimum level of logs sent to this output
+
+`level`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")
+
+### level Type
+
+`string`
+
+### level Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"error"`   |             |
+| `"warn"`    |             |
+| `"info"`    |             |
+| `"http"`    |             |
+| `"verbose"` |             |
+| `"debug"`   |             |
+| `"silly"`   |             |
+
+## path
+
+Path where the logs will be stored (absolute or relative to config file)
+
+`path`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")
+
+### path Type
+
+`string`
+
+## maxFiles
+
+Maximum number of log files to store
+
+`maxFiles`
+
+*   is optional
+
+*   Type: `integer`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")
+
+### maxFiles Type
+
+`integer`
+
+### maxFiles Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1`
+
+## maxSize
+
+Maximum size of a single log file in bytes
+
+`maxSize`
+
+*   is optional
+
+*   Type: `integer`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")
+
+### maxSize Type
+
+`integer`
+
+### maxSize Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1024`
+
+## frequency
+
+The frequency of creating new log files (regardless of maxSize)
+
+`frequency`
+
+*   is optional
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency")
+
+### frequency Type
+
+`string`
+
+### frequency Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"yearly"`  |             |
+| `"monthly"` |             |
+| `"daily"`   |             |
+| `"hourly"`  |             |
+
+### frequency Default Value
+
+The default value is:
+
+```json
+"daily"
+```
+
+## archive
+
+Whether to archive old logs
+
+`archive`
+
+*   is optional
+
+*   Type: `boolean`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-0-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")
+
+### archive Type
+
+`boolean`

+ 11 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-1.md

@@ -0,0 +1,11 @@
+## 1 Type
+
+`string`
+
+## 1 Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value   | Explanation |
+| :------ | :---------- |
+| `"off"` |             |

+ 3 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md

@@ -0,0 +1,3 @@
+## archive Type
+
+`boolean`

+ 22 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md

@@ -0,0 +1,22 @@
+## frequency Type
+
+`string`
+
+## frequency Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"yearly"`  |             |
+| `"monthly"` |             |
+| `"daily"`   |             |
+| `"hourly"`  |             |
+
+## frequency Default Value
+
+The default value is:
+
+```json
+"daily"
+```

+ 2 - 3
distributor-node/docs/schema/definition-properties-log-properties-console.md → distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md

@@ -1,8 +1,8 @@
-## console Type
+## level Type
 
 `string`
 
-## console Constraints
+## level Constraints
 
 **enum**: the value of this property must be equal to one of the following values:
 
@@ -15,4 +15,3 @@
 | `"verbose"` |             |
 | `"debug"`   |             |
 | `"silly"`   |             |
-| `"off"`     |             |

+ 7 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxfiles.md

@@ -0,0 +1,7 @@
+## maxFiles Type
+
+`integer`
+
+## maxFiles Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1`

+ 7 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md

@@ -0,0 +1,7 @@
+## maxSize Type
+
+`integer`
+
+## maxSize Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1024`

+ 3 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md

@@ -0,0 +1,3 @@
+## path Type
+
+`string`

+ 163 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-file-logging-options.md

@@ -0,0 +1,163 @@
+## 0 Type
+
+`object` ([File logging options](definition-properties-logs-properties-file-oneof-file-logging-options.md))
+
+# 0 Properties
+
+| Property                | Type      | Required | Nullable       | Defined by                                                                                                                                                                                                                                 |
+| :---------------------- | :-------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [level](#level)         | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")         |
+| [path](#path)           | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")           |
+| [maxFiles](#maxfiles)   | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")   |
+| [maxSize](#maxsize)     | `integer` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")     |
+| [frequency](#frequency) | `string`  | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency") |
+| [archive](#archive)     | `boolean` | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")     |
+
+## level
+
+Minimum level of logs sent to this output
+
+`level`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-level.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/level")
+
+### level Type
+
+`string`
+
+### level Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"error"`   |             |
+| `"warn"`    |             |
+| `"info"`    |             |
+| `"http"`    |             |
+| `"verbose"` |             |
+| `"debug"`   |             |
+| `"silly"`   |             |
+
+## path
+
+Path where the logs will be stored (absolute or relative to config file)
+
+`path`
+
+*   is required
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-path.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/path")
+
+### path Type
+
+`string`
+
+## maxFiles
+
+Maximum number of log files to store
+
+`maxFiles`
+
+*   is optional
+
+*   Type: `integer`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxfiles.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxFiles")
+
+### maxFiles Type
+
+`integer`
+
+### maxFiles Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1`
+
+## maxSize
+
+Maximum size of a single log file in bytes
+
+`maxSize`
+
+*   is optional
+
+*   Type: `integer`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-maxsize.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/maxSize")
+
+### maxSize Type
+
+`integer`
+
+### maxSize Constraints
+
+**minimum**: the value of this number must greater than or equal to: `1024`
+
+## frequency
+
+The frequency of creating new log files (regardless of maxSize)
+
+`frequency`
+
+*   is optional
+
+*   Type: `string`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-frequency.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/frequency")
+
+### frequency Type
+
+`string`
+
+### frequency Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value       | Explanation |
+| :---------- | :---------- |
+| `"yearly"`  |             |
+| `"monthly"` |             |
+| `"daily"`   |             |
+| `"hourly"`  |             |
+
+### frequency Default Value
+
+The default value is:
+
+```json
+"daily"
+```
+
+## archive
+
+Whether to archive old logs
+
+`archive`
+
+*   is optional
+
+*   Type: `boolean`
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file-oneof-file-logging-options-properties-archive.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file/oneOf/0/properties/archive")
+
+### archive Type
+
+`boolean`

+ 11 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file-oneof-switch-off.md

@@ -0,0 +1,11 @@
+## 1 Type
+
+`string` ([Switch off](definition-properties-logs-properties-file-oneof-switch-off.md))
+
+## 1 Constraints
+
+**enum**: the value of this property must be equal to one of the following values:
+
+| Value   | Explanation |
+| :------ | :---------- |
+| `"off"` |             |

+ 9 - 0
distributor-node/docs/schema/definition-properties-logs-properties-file.md

@@ -0,0 +1,9 @@
+## file Type
+
+merged type ([Details](definition-properties-logs-properties-file.md))
+
+one (and only one) of
+
+*   [File logging options](definition-properties-logs-properties-file-oneof-file-logging-options.md "check type definition")
+
+*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")

+ 83 - 0
distributor-node/docs/schema/definition-properties-logs.md

@@ -0,0 +1,83 @@
+## logs Type
+
+`object` ([Details](definition-properties-logs.md))
+
+# logs Properties
+
+| Property            | Type   | Required | Nullable       | Defined by                                                                                                                                                          |
+| :------------------ | :----- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| [file](#file)       | Merged | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-file.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file")       |
+| [console](#console) | Merged | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-console.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console") |
+| [elastic](#elastic) | Merged | Optional | cannot be null | [Distributor node configuration](definition-properties-logs-properties-elastic.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic") |
+
+## file
+
+
+
+`file`
+
+*   is optional
+
+*   Type: merged type ([Details](definition-properties-logs-properties-file.md))
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-file.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/file")
+
+### file Type
+
+merged type ([Details](definition-properties-logs-properties-file.md))
+
+one (and only one) of
+
+*   [File logging options](definition-properties-logs-properties-file-oneof-file-logging-options.md "check type definition")
+
+*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")
+
+## console
+
+
+
+`console`
+
+*   is optional
+
+*   Type: merged type ([Details](definition-properties-logs-properties-console.md))
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-console.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/console")
+
+### console Type
+
+merged type ([Details](definition-properties-logs-properties-console.md))
+
+one (and only one) of
+
+*   [Console logging options](definition-properties-logs-properties-console-oneof-console-logging-options.md "check type definition")
+
+*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")
+
+## elastic
+
+
+
+`elastic`
+
+*   is optional
+
+*   Type: merged type ([Details](definition-properties-logs-properties-elastic.md))
+
+*   cannot be null
+
+*   defined in: [Distributor node configuration](definition-properties-logs-properties-elastic.md "https://joystream.org/schemas/argus/config#/properties/logs/properties/elastic")
+
+### elastic Type
+
+merged type ([Details](definition-properties-logs-properties-elastic.md))
+
+one (and only one) of
+
+*   [Elasticsearch logging options](definition-properties-logs-properties-elastic-oneof-elasticsearch-logging-options.md "check type definition")
+
+*   [Switch off](definition-properties-logs-properties-file-oneof-switch-off.md "check type definition")

+ 28 - 28
distributor-node/docs/schema/definition.md

@@ -4,18 +4,18 @@
 
 # Distributor node configuration Properties
 
-| Property                    | Type      | Required | Nullable       | Defined by                                                                                                 |
-| :-------------------------- | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------- |
-| [id](#id)                   | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-id.md "undefined#/properties/id")                   |
-| [endpoints](#endpoints)     | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-endpoints.md "undefined#/properties/endpoints")     |
-| [directories](#directories) | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-directories.md "undefined#/properties/directories") |
-| [log](#log)                 | `object`  | Optional | cannot be null | [Distributor node configuration](definition-properties-log.md "undefined#/properties/log")                 |
-| [limits](#limits)           | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-limits.md "undefined#/properties/limits")           |
-| [intervals](#intervals)     | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-intervals.md "undefined#/properties/intervals")     |
-| [port](#port)               | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-port.md "undefined#/properties/port")               |
-| [keys](#keys)               | `array`   | Required | cannot be null | [Distributor node configuration](definition-properties-keys.md "undefined#/properties/keys")               |
-| [buckets](#buckets)         | Merged    | Required | cannot be null | [Distributor node configuration](definition-properties-buckets.md "undefined#/properties/buckets")         |
-| [workerId](#workerid)       | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-workerid.md "undefined#/properties/workerId")       |
+| Property                    | Type      | Required | Nullable       | Defined by                                                                                                                                  |
+| :-------------------------- | :-------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------ |
+| [id](#id)                   | `string`  | Required | cannot be null | [Distributor node configuration](definition-properties-id.md "https://joystream.org/schemas/argus/config#/properties/id")                   |
+| [endpoints](#endpoints)     | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-endpoints.md "https://joystream.org/schemas/argus/config#/properties/endpoints")     |
+| [directories](#directories) | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-directories.md "https://joystream.org/schemas/argus/config#/properties/directories") |
+| [logs](#logs)               | `object`  | Optional | cannot be null | [Distributor node configuration](definition-properties-logs.md "https://joystream.org/schemas/argus/config#/properties/logs")               |
+| [limits](#limits)           | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-limits.md "https://joystream.org/schemas/argus/config#/properties/limits")           |
+| [intervals](#intervals)     | `object`  | Required | cannot be null | [Distributor node configuration](definition-properties-intervals.md "https://joystream.org/schemas/argus/config#/properties/intervals")     |
+| [port](#port)               | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-port.md "https://joystream.org/schemas/argus/config#/properties/port")               |
+| [keys](#keys)               | `array`   | Required | cannot be null | [Distributor node configuration](definition-properties-keys.md "https://joystream.org/schemas/argus/config#/properties/keys")               |
+| [buckets](#buckets)         | Merged    | Required | cannot be null | [Distributor node configuration](definition-properties-buckets.md "https://joystream.org/schemas/argus/config#/properties/buckets")         |
+| [workerId](#workerid)       | `integer` | Required | cannot be null | [Distributor node configuration](definition-properties-workerid.md "https://joystream.org/schemas/argus/config#/properties/workerId")       |
 
 ## id
 
@@ -29,7 +29,7 @@ Node identifier used when sending elasticsearch logs and exposed on /status endp
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-id.md "undefined#/properties/id")
+*   defined in: [Distributor node configuration](definition-properties-id.md "https://joystream.org/schemas/argus/config#/properties/id")
 
 ### id Type
 
@@ -51,7 +51,7 @@ Specifies external endpoints that the distributor node will connect to
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-endpoints.md "undefined#/properties/endpoints")
+*   defined in: [Distributor node configuration](definition-properties-endpoints.md "https://joystream.org/schemas/argus/config#/properties/endpoints")
 
 ### endpoints Type
 
@@ -69,29 +69,29 @@ Specifies paths where node's data will be stored
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-directories.md "undefined#/properties/directories")
+*   defined in: [Distributor node configuration](definition-properties-directories.md "https://joystream.org/schemas/argus/config#/properties/directories")
 
 ### directories Type
 
 `object` ([Details](definition-properties-directories.md))
 
-## log
+## logs
 
-Specifies minimum log levels by supported log outputs
+Specifies the logging configuration
 
-`log`
+`logs`
 
 *   is optional
 
-*   Type: `object` ([Details](definition-properties-log.md))
+*   Type: `object` ([Details](definition-properties-logs.md))
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-log.md "undefined#/properties/log")
+*   defined in: [Distributor node configuration](definition-properties-logs.md "https://joystream.org/schemas/argus/config#/properties/logs")
 
-### log Type
+### logs Type
 
-`object` ([Details](definition-properties-log.md))
+`object` ([Details](definition-properties-logs.md))
 
 ## limits
 
@@ -105,7 +105,7 @@ Specifies node limits w\.r.t. storage, outbound connections etc.
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-limits.md "undefined#/properties/limits")
+*   defined in: [Distributor node configuration](definition-properties-limits.md "https://joystream.org/schemas/argus/config#/properties/limits")
 
 ### limits Type
 
@@ -123,7 +123,7 @@ Specifies how often periodic tasks (for example cache cleanup) are executed by t
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-intervals.md "undefined#/properties/intervals")
+*   defined in: [Distributor node configuration](definition-properties-intervals.md "https://joystream.org/schemas/argus/config#/properties/intervals")
 
 ### intervals Type
 
@@ -141,7 +141,7 @@ Distributor node http api port
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-port.md "undefined#/properties/port")
+*   defined in: [Distributor node configuration](definition-properties-port.md "https://joystream.org/schemas/argus/config#/properties/port")
 
 ### port Type
 
@@ -163,7 +163,7 @@ Specifies the keys available within distributor node CLI.
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-keys.md "undefined#/properties/keys")
+*   defined in: [Distributor node configuration](definition-properties-keys.md "https://joystream.org/schemas/argus/config#/properties/keys")
 
 ### keys Type
 
@@ -185,7 +185,7 @@ Specifies the buckets distributed by the node
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-buckets.md "undefined#/properties/buckets")
+*   defined in: [Distributor node configuration](definition-properties-buckets.md "https://joystream.org/schemas/argus/config#/properties/buckets")
 
 ### buckets Type
 
@@ -209,7 +209,7 @@ ID of the node operator (distribution working group worker)
 
 *   cannot be null
 
-*   defined in: [Distributor node configuration](definition-properties-workerid.md "undefined#/properties/workerId")
+*   defined in: [Distributor node configuration](definition-properties-workerid.md "https://joystream.org/schemas/argus/config#/properties/workerId")
 
 ### workerId Type
 

+ 63 - 87
distributor-node/src/schemas/configSchema.ts

@@ -1,11 +1,25 @@
 import { JSONSchema4 } from 'json-schema'
 import winston from 'winston'
 import { MAX_CONCURRENT_RESPONSE_TIME_CHECKS } from '../services/networking/NetworkingService'
+import { objectSchema } from './utils'
 
 export const bytesizeUnits = ['B', 'K', 'M', 'G', 'T']
 export const bytesizeRegex = new RegExp(`^[0-9]+(${bytesizeUnits.join('|')})$`)
 
+const logLevelSchema: JSONSchema4 = {
+  description: 'Minimum level of logs sent to this output',
+  type: 'string',
+  enum: [...Object.keys(winston.config.npm.levels)],
+}
+
+const offSwitch: JSONSchema4 = {
+  title: 'Switch off',
+  type: 'string',
+  enum: ['off'],
+}
+
 export const configSchema: JSONSchema4 = {
+  '$id': 'https://joystream.org/schemas/argus/config',
   title: 'Distributor node configuration',
   description: 'Configuration schema for distirubtor CLI and node',
   type: 'object',
@@ -17,11 +31,8 @@ export const configSchema: JSONSchema4 = {
       description: 'Node identifier used when sending elasticsearch logs and exposed on /status endpoint',
       minLength: 1,
     },
-    endpoints: {
-      type: 'object',
+    endpoints: objectSchema({
       description: 'Specifies external endpoints that the distributor node will connect to',
-      additionalProperties: false,
-      required: ['queryNode', 'joystreamNodeWs'],
       properties: {
         queryNode: {
           description: 'Query node graphql server uri (for example: http://localhost:8081/graphql)',
@@ -32,11 +43,9 @@ export const configSchema: JSONSchema4 = {
           type: 'string',
         },
       },
-    },
-    directories: {
-      type: 'object',
-      required: ['assets', 'cacheState'],
-      additionalProperties: false,
+      required: ['queryNode', 'joystreamNodeWs'],
+    }),
+    directories: objectSchema({
       description: "Specifies paths where node's data will be stored",
       properties: {
         assets: {
@@ -49,21 +58,17 @@ export const configSchema: JSONSchema4 = {
           type: 'string',
         },
       },
-    },
-    logs: {
-      type: 'object',
-      additionalProperties: false,
+      required: ['assets', 'cacheState'],
+    }),
+    logs: objectSchema({
       description: 'Specifies the logging configuration',
       properties: {
         file: {
           oneOf: [
-            {
-              type: 'object',
-              additionalProperties: false,
-              required: ['level', 'path'],
-              description: 'File logging options',
+            objectSchema({
+              title: 'File logging options',
               properties: {
-                level: { $ref: '#/definitions/logLevel' },
+                level: logLevelSchema,
                 path: {
                   description: 'Path where the logs will be stored (absolute or relative to config file)',
                   type: 'string',
@@ -90,64 +95,42 @@ export const configSchema: JSONSchema4 = {
                   type: 'boolean',
                 },
               },
-            },
-            {
-              type: 'string',
-              enum: ['off'],
-            },
+              required: ['level', 'path'],
+            }),
+            offSwitch,
           ],
         },
         console: {
           oneOf: [
-            {
-              type: 'object',
-              additionalProperties: false,
+            objectSchema({
+              title: 'Console logging options',
+              properties: { level: logLevelSchema },
               required: ['level'],
-              description: 'Console logging options',
-              properties: {
-                level: { $ref: '#/definitions/logLevel' },
-              },
-            },
-            {
-              type: 'string',
-              enum: ['off'],
-            },
+            }),
+            offSwitch,
           ],
         },
         elastic: {
           oneOf: [
-            {
-              type: 'object',
-              additionalProperties: false,
-              required: ['level', 'endpoint'],
-              description: 'Elasticsearch logging options',
+            objectSchema({
+              title: 'Elasticsearch logging options',
               properties: {
-                level: { $ref: '#/definitions/logLevel' },
+                level: logLevelSchema,
                 endpoint: {
                   description: 'Elastichsearch endpoint to push the logs to (for example: http://localhost:9200)',
                   type: 'string',
                 },
               },
-            },
-            {
-              type: 'string',
-              enum: ['off'],
-            },
+              required: ['level', 'endpoint'],
+            }),
+            offSwitch,
           ],
         },
       },
-    },
-    limits: {
-      type: 'object',
-      required: [
-        'storage',
-        'maxConcurrentStorageNodeDownloads',
-        'maxConcurrentOutboundConnections',
-        'outboundRequestsTimeoutMs',
-        'pendingDownloadTimeoutSec',
-      ],
+      required: [],
+    }),
+    limits: objectSchema({
       description: 'Specifies node limits w.r.t. storage, outbound connections etc.',
-      additionalProperties: false,
       properties: {
         storage: {
           description: 'Maximum total size of all (cached) assets stored in `directories.assets`',
@@ -182,16 +165,21 @@ export const configSchema: JSONSchema4 = {
         },
         dataObjectSourceByObjectIdTTL: {
           description:
-            'TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects of size greater than maxCachedItemSize to the right storage node. Defaults to `60` if not specified.',
+            'TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects of size greater than maxCachedItemSize to the right storage node.',
+          default: 60,
           type: 'integer',
           minimum: 1,
         },
       },
-    },
-    intervals: {
-      type: 'object',
-      required: ['saveCacheState', 'checkStorageNodeResponseTimes', 'cacheCleanup'],
-      additionalProperties: false,
+      required: [
+        'storage',
+        'maxConcurrentStorageNodeDownloads',
+        'maxConcurrentOutboundConnections',
+        'outboundRequestsTimeoutMs',
+        'pendingDownloadTimeoutSec',
+      ],
+    }),
+    intervals: objectSchema({
       description: 'Specifies how often periodic tasks (for example cache cleanup) are executed by the node.',
       properties: {
         saveCacheState: {
@@ -217,45 +205,40 @@ export const configSchema: JSONSchema4 = {
           minimum: 1,
         },
       },
-    },
+      required: ['saveCacheState', 'checkStorageNodeResponseTimes', 'cacheCleanup'],
+    }),
     port: { description: 'Distributor node http api port', type: 'integer', minimum: 0 },
     keys: {
       description: 'Specifies the keys available within distributor node CLI.',
       type: 'array',
       items: {
         oneOf: [
-          {
-            type: 'object',
+          objectSchema({
             title: 'Substrate uri',
             description: "Keypair's substrate uri (for example: //Alice)",
-            required: ['suri'],
-            additionalProperties: false,
             properties: {
               type: { type: 'string', enum: ['ed25519', 'sr25519', 'ecdsa'], default: 'sr25519' },
               suri: { type: 'string' },
             },
-          },
-          {
-            type: 'object',
+            required: ['suri'],
+          }),
+          objectSchema({
             title: 'Mnemonic phrase',
             description: 'Menomonic phrase',
-            required: ['mnemonic'],
-            additionalProperties: false,
             properties: {
               type: { type: 'string', enum: ['ed25519', 'sr25519', 'ecdsa'], default: 'sr25519' },
               mnemonic: { type: 'string' },
             },
-          },
-          {
-            type: 'object',
+            required: ['mnemonic'],
+          }),
+          objectSchema({
             title: 'JSON backup file',
             description: 'Path to JSON backup file from polkadot signer / polakdot/apps (relative to config file path)',
-            required: ['keyfile'],
-            additionalProperties: false,
             properties: {
               keyfile: { type: 'string' },
             },
-          },
+            required: ['keyfile'],
+          }),
         ],
       },
       minItems: 1,
@@ -284,13 +267,6 @@ export const configSchema: JSONSchema4 = {
       minimum: 0,
     },
   },
-  definitions: {
-    logLevel: {
-      description: 'Minimum level of logs sent to this output',
-      type: 'string',
-      enum: [...Object.keys(winston.config.npm.levels)],
-    },
-  },
 }
 
 export default configSchema

+ 4 - 1
distributor-node/src/schemas/scripts/generateTypes.ts

@@ -7,7 +7,10 @@ import { schemas } from '..'
 const prettierConfig = require('@joystream/prettier-config')
 
 Object.entries(schemas).forEach(([schemaKey, schema]) => {
-  compile(schema, `${schemaKey}Json`, { style: prettierConfig, ignoreMinAndMaxItems: true })
+  compile(schema, `${schemaKey}Json`, {
+    style: prettierConfig,
+    ignoreMinAndMaxItems: true,
+  })
     .then((output) => fs.writeFileSync(path.resolve(__dirname, `../../types/generated/${schemaKey}Json.d.ts`), output))
     .catch(console.error)
 })

+ 14 - 0
distributor-node/src/schemas/utils.ts

@@ -0,0 +1,14 @@
+import { JSONSchema4 } from 'json-schema'
+
+export function objectSchema<P extends NonNullable<JSONSchema4['properties']>>(props: {
+  title?: string
+  description?: string
+  properties: P
+  required: Array<keyof P & string>
+}): JSONSchema4 {
+  return {
+    type: 'object',
+    additionalProperties: false,
+    ...props,
+  }
+}

+ 14 - 9
distributor-node/src/types/generated/ConfigJson.d.ts

@@ -5,10 +5,6 @@
  * and run json-schema-to-typescript to regenerate this file.
  */
 
-/**
- * Minimum level of logs sent to this output
- */
-export type LogLevel = 'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly'
 /**
  * List of distribution bucket ids
  */
@@ -58,13 +54,16 @@ export interface DistributorNodeConfiguration {
   logs?: {
     file?:
       | {
-          level: LogLevel
+          /**
+           * Minimum level of logs sent to this output
+           */
+          level: 'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly'
           /**
            * Path where the logs will be stored (absolute or relative to config file)
            */
           path: string
           /**
-           * Maximum number of log files to create
+           * Maximum number of log files to store
            */
           maxFiles?: number
           /**
@@ -83,12 +82,18 @@ export interface DistributorNodeConfiguration {
       | 'off'
     console?:
       | {
-          level: LogLevel
+          /**
+           * Minimum level of logs sent to this output
+           */
+          level: 'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly'
         }
       | 'off'
     elastic?:
       | {
-          level: LogLevel
+          /**
+           * Minimum level of logs sent to this output
+           */
+          level: 'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly'
           /**
            * Elastichsearch endpoint to push the logs to (for example: http://localhost:9200)
            */
@@ -125,7 +130,7 @@ export interface DistributorNodeConfiguration {
      */
     maxCachedItemSize?: string
     /**
-     * TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects of size greater than maxCachedItemSize to the right storage node. Defaults to `60` if not specified.
+     * TTL (in seconds) for dataObjectSourceByObjectId cache used when proxying objects of size greater than maxCachedItemSize to the right storage node.
      */
     dataObjectSourceByObjectIdTTL?: number
   }