diff --git a/site/content/3.12/develop/http-api/collections.md b/site/content/3.12/develop/http-api/collections.md index 376f9d441b..5a43c6661f 100644 --- a/site/content/3.12/develop/http-api/collections.md +++ b/site/content/3.12/develop/http-api/collections.md @@ -375,7 +375,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -403,16 +402,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -706,7 +705,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -734,16 +732,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -1054,7 +1052,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -1082,16 +1079,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -1798,7 +1795,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -1826,16 +1822,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -2370,11 +2366,6 @@ paths: additional options for key generation. If specified, then `keyOptions` should be a JSON object containing the following attributes: type: object - required: - - type - - allowUserKeys - - increment - - offset properties: type: description: | @@ -2427,13 +2418,13 @@ paths: type: boolean increment: description: | - increment value for `autoincrement` key generator. Not used for other key - generator types. + The increment value for the `autoincrement` key generator. + Not allowed for other key generator types. type: integer offset: description: | - Initial offset value for `autoincrement` key generator. - Not used for other key generator types. + The initial offset value for the `autoincrement` key generator. + Not allowed for other key generator types. type: integer type: description: | @@ -2690,7 +2681,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -2718,16 +2708,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value for the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -4028,7 +4018,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -4056,16 +4045,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: diff --git a/site/content/3.12/develop/http-api/monitoring/logs.md b/site/content/3.12/develop/http-api/monitoring/logs.md index 6a6d6805fd..4d60756d33 100644 --- a/site/content/3.12/develop/http-api/monitoring/logs.md +++ b/site/content/3.12/develop/http-api/monitoring/logs.md @@ -444,6 +444,11 @@ paths: description: | One of the possible log topics. type: string + deprecation: + description: | + Warns about deprecated features and the usage of options that + will not be allowed or have no effect in a future version. + type: string development: description: | One of the possible log topics. diff --git a/site/content/3.12/develop/javascript-api/@arangodb/collection-object.md b/site/content/3.12/develop/javascript-api/@arangodb/collection-object.md index 84efc05d4a..8765328ca1 100644 --- a/site/content/3.12/develop/javascript-api/@arangodb/collection-object.md +++ b/site/content/3.12/develop/javascript-api/@arangodb/collection-object.md @@ -208,11 +208,11 @@ Returns an object containing all collection properties. auto-generate keys in this case are not aware of all keys which are already used. {{< /warning >}} - `increment` (number): The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. - `offset` (number): The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. - - `lastValue` (number): the current offset value of the `autoincrement` or `padded` - key generator. This an internal property for restoring dumps properly. + Not used by other key generator types. + - `lastValue` (number): the offset value of the `autoincrement` or `padded` + key generator. This is an internal property for restoring dumps properly. - `schema` (object\|null): An object that specifies the collection-level document schema for documents. diff --git a/site/content/3.12/develop/javascript-api/@arangodb/db-object.md b/site/content/3.12/develop/javascript-api/@arangodb/db-object.md index 20dfb1d138..5693d93124 100644 --- a/site/content/3.12/develop/javascript-api/@arangodb/db-object.md +++ b/site/content/3.12/develop/javascript-api/@arangodb/db-object.md @@ -272,9 +272,11 @@ error is thrown. For information about the naming constraints for collections, s auto-generate keys in this case are not aware of all keys which are already used. {{< /warning >}} - `increment`: The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not allowed for other key generator types. - `offset`: The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not allowed for other key generator types. + - `lastValue`: the offset value for the `autoincrement` or `padded` + key generator. This is an internal property for restoring dumps properly. - `schema` (object\|null, _optional_, default: `null`): An object that specifies the collection-level document schema for documents. diff --git a/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md b/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md index 916cff32d7..2b6504c234 100644 --- a/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md +++ b/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md @@ -59,11 +59,18 @@ characters using the default settings. #### Collection API When creating a collection using the `POST /_api/collection` endpoint, the -server log now displays a deprecation message if illegal combinations and +server log now displays a `deprecation` message if illegal combinations and unknown attributes and values are detected in the request body. -Note that all invalid elements and combinations will be rejected in future -versions. +Note that all invalid elements and value combinations will be rejected in future +versions. The following options are already validated more strictly in v3.12 +and incorrect use can lead to errors: + +- `keyOptions`: The `increment` and `offset` sub-attributes are only allowed if + the `type` sub-attribute is `"autoincrement"`. The `lastValue` sub-attribute + is only allowed if the `type` sub-attribute is `"traditional"`, `"autoincrement"`, + or `"padded"`. +- `shardKeys`: Each array element needs to be a string. #### Index API @@ -195,6 +202,10 @@ longer use the `ldap` log topic. Changing the log level of the `ldap` topic or any other unknown topic is not an error, however. Also see [Incompatible changes in ArangoDB 3.12](incompatible-changes-in-3-12.md#ldap-authentication-support-removed). +A new `deprecation` log topic has been added. It warns about deprecated features +and the usage of options that will not be allowed or have no effect in a future +version. + #### Error code `12` removed The unused error `ERROR_OUT_OF_MEMORY_MMAP` with the number `12` has been removed. diff --git a/site/content/3.12/release-notes/version-3.12/incompatible-changes-in-3-12.md b/site/content/3.12/release-notes/version-3.12/incompatible-changes-in-3-12.md index db559a61c9..0e9658485c 100644 --- a/site/content/3.12/release-notes/version-3.12/incompatible-changes-in-3-12.md +++ b/site/content/3.12/release-notes/version-3.12/incompatible-changes-in-3-12.md @@ -206,6 +206,13 @@ or user-defined AQL functions (UDFs), compare or sort strings in them, and Unicode characters for which the standard has changed between the two ICU versions are involved. +## Stricter option validation when creating collections + +Some invalid attributes and values that you can specify in the HTTP API when +creating collections are no longer allowed. Previous versions ignored these +invalid options. See [API Changes in ArangoDB 3.12](api-changes-in-3-12.md#collection-api) +for details. + ## Control character escaping in audit log The audit log feature of the Enterprise Edition previously logged query strings diff --git a/site/content/3.13/develop/http-api/collections.md b/site/content/3.13/develop/http-api/collections.md index 376f9d441b..5a43c6661f 100644 --- a/site/content/3.13/develop/http-api/collections.md +++ b/site/content/3.13/develop/http-api/collections.md @@ -375,7 +375,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -403,16 +402,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -706,7 +705,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -734,16 +732,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -1054,7 +1052,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -1082,16 +1079,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -1798,7 +1795,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -1826,16 +1822,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -2370,11 +2366,6 @@ paths: additional options for key generation. If specified, then `keyOptions` should be a JSON object containing the following attributes: type: object - required: - - type - - allowUserKeys - - increment - - offset properties: type: description: | @@ -2427,13 +2418,13 @@ paths: type: boolean increment: description: | - increment value for `autoincrement` key generator. Not used for other key - generator types. + The increment value for the `autoincrement` key generator. + Not allowed for other key generator types. type: integer offset: description: | - Initial offset value for `autoincrement` key generator. - Not used for other key generator types. + The initial offset value for the `autoincrement` key generator. + Not allowed for other key generator types. type: integer type: description: | @@ -2690,7 +2681,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -2718,16 +2708,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value for the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: @@ -4028,7 +4018,6 @@ paths: required: - type - allowUserKeys - - lastValue properties: type: description: | @@ -4056,16 +4045,16 @@ paths: increment: description: | The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer offset: description: | The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. type: integer lastValue: description: | - The current offset value of the `autoincrement` or `padded` key generator. + The offset value of the `autoincrement` or `padded` key generator. This is an internal property for restoring dumps properly. type: integer cacheEnabled: diff --git a/site/content/3.13/develop/http-api/monitoring/logs.md b/site/content/3.13/develop/http-api/monitoring/logs.md index 6a6d6805fd..4d60756d33 100644 --- a/site/content/3.13/develop/http-api/monitoring/logs.md +++ b/site/content/3.13/develop/http-api/monitoring/logs.md @@ -444,6 +444,11 @@ paths: description: | One of the possible log topics. type: string + deprecation: + description: | + Warns about deprecated features and the usage of options that + will not be allowed or have no effect in a future version. + type: string development: description: | One of the possible log topics. diff --git a/site/content/3.13/develop/javascript-api/@arangodb/collection-object.md b/site/content/3.13/develop/javascript-api/@arangodb/collection-object.md index 84efc05d4a..8765328ca1 100644 --- a/site/content/3.13/develop/javascript-api/@arangodb/collection-object.md +++ b/site/content/3.13/develop/javascript-api/@arangodb/collection-object.md @@ -208,11 +208,11 @@ Returns an object containing all collection properties. auto-generate keys in this case are not aware of all keys which are already used. {{< /warning >}} - `increment` (number): The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not used by other key generator types. - `offset` (number): The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. - - `lastValue` (number): the current offset value of the `autoincrement` or `padded` - key generator. This an internal property for restoring dumps properly. + Not used by other key generator types. + - `lastValue` (number): the offset value of the `autoincrement` or `padded` + key generator. This is an internal property for restoring dumps properly. - `schema` (object\|null): An object that specifies the collection-level document schema for documents. diff --git a/site/content/3.13/develop/javascript-api/@arangodb/db-object.md b/site/content/3.13/develop/javascript-api/@arangodb/db-object.md index 20dfb1d138..5693d93124 100644 --- a/site/content/3.13/develop/javascript-api/@arangodb/db-object.md +++ b/site/content/3.13/develop/javascript-api/@arangodb/db-object.md @@ -272,9 +272,11 @@ error is thrown. For information about the naming constraints for collections, s auto-generate keys in this case are not aware of all keys which are already used. {{< /warning >}} - `increment`: The increment value for the `autoincrement` key generator. - Not used for other key generator types. + Not allowed for other key generator types. - `offset`: The initial offset value for the `autoincrement` key generator. - Not used for other key generator types. + Not allowed for other key generator types. + - `lastValue`: the offset value for the `autoincrement` or `padded` + key generator. This is an internal property for restoring dumps properly. - `schema` (object\|null, _optional_, default: `null`): An object that specifies the collection-level document schema for documents. diff --git a/site/content/3.13/release-notes/version-3.12/api-changes-in-3-12.md b/site/content/3.13/release-notes/version-3.12/api-changes-in-3-12.md index 916cff32d7..2b6504c234 100644 --- a/site/content/3.13/release-notes/version-3.12/api-changes-in-3-12.md +++ b/site/content/3.13/release-notes/version-3.12/api-changes-in-3-12.md @@ -59,11 +59,18 @@ characters using the default settings. #### Collection API When creating a collection using the `POST /_api/collection` endpoint, the -server log now displays a deprecation message if illegal combinations and +server log now displays a `deprecation` message if illegal combinations and unknown attributes and values are detected in the request body. -Note that all invalid elements and combinations will be rejected in future -versions. +Note that all invalid elements and value combinations will be rejected in future +versions. The following options are already validated more strictly in v3.12 +and incorrect use can lead to errors: + +- `keyOptions`: The `increment` and `offset` sub-attributes are only allowed if + the `type` sub-attribute is `"autoincrement"`. The `lastValue` sub-attribute + is only allowed if the `type` sub-attribute is `"traditional"`, `"autoincrement"`, + or `"padded"`. +- `shardKeys`: Each array element needs to be a string. #### Index API @@ -195,6 +202,10 @@ longer use the `ldap` log topic. Changing the log level of the `ldap` topic or any other unknown topic is not an error, however. Also see [Incompatible changes in ArangoDB 3.12](incompatible-changes-in-3-12.md#ldap-authentication-support-removed). +A new `deprecation` log topic has been added. It warns about deprecated features +and the usage of options that will not be allowed or have no effect in a future +version. + #### Error code `12` removed The unused error `ERROR_OUT_OF_MEMORY_MMAP` with the number `12` has been removed. diff --git a/site/content/3.13/release-notes/version-3.12/incompatible-changes-in-3-12.md b/site/content/3.13/release-notes/version-3.12/incompatible-changes-in-3-12.md index db559a61c9..0e9658485c 100644 --- a/site/content/3.13/release-notes/version-3.12/incompatible-changes-in-3-12.md +++ b/site/content/3.13/release-notes/version-3.12/incompatible-changes-in-3-12.md @@ -206,6 +206,13 @@ or user-defined AQL functions (UDFs), compare or sort strings in them, and Unicode characters for which the standard has changed between the two ICU versions are involved. +## Stricter option validation when creating collections + +Some invalid attributes and values that you can specify in the HTTP API when +creating collections are no longer allowed. Previous versions ignored these +invalid options. See [API Changes in ArangoDB 3.12](api-changes-in-3-12.md#collection-api) +for details. + ## Control character escaping in audit log The audit log feature of the Enterprise Edition previously logged query strings