diff --git a/grpc_apis/ocis/messages/search/v0/grpc.md b/grpc_apis/ocis/messages/search/v0/grpc.md index 0c99d0abf68..db7d22827f4 100644 --- a/grpc_apis/ocis/messages/search/v0/grpc.md +++ b/grpc_apis/ocis/messages/search/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.search.v0" url: /grpc_apis/ocis_messages_search_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/settings/v0/grpc.md b/grpc_apis/ocis/messages/settings/v0/grpc.md index f4da1376337..e69b052cba7 100644 --- a/grpc_apis/ocis/messages/settings/v0/grpc.md +++ b/grpc_apis/ocis/messages/settings/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.settings.v0" url: /grpc_apis/ocis_messages_settings_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/store/v0/grpc.md b/grpc_apis/ocis/messages/store/v0/grpc.md index 5425a59c29b..58baf93d4c2 100644 --- a/grpc_apis/ocis/messages/store/v0/grpc.md +++ b/grpc_apis/ocis/messages/store/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.store.v0" url: /grpc_apis/ocis_messages_store_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/thumbnails/v0/grpc.md b/grpc_apis/ocis/messages/thumbnails/v0/grpc.md index 1896bfb8d24..3c2dc493d90 100644 --- a/grpc_apis/ocis/messages/thumbnails/v0/grpc.md +++ b/grpc_apis/ocis/messages/thumbnails/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.thumbnails.v0" url: /grpc_apis/ocis_messages_thumbnails_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/search/v0/grpc.md b/grpc_apis/ocis/services/search/v0/grpc.md index febcd92b0c7..7bd874ad742 100644 --- a/grpc_apis/ocis/services/search/v0/grpc.md +++ b/grpc_apis/ocis/services/search/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.search.v0" url: /grpc_apis/ocis_services_search_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/settings/v0/grpc.md b/grpc_apis/ocis/services/settings/v0/grpc.md index 8066ddba1b0..201d16db73c 100644 --- a/grpc_apis/ocis/services/settings/v0/grpc.md +++ b/grpc_apis/ocis/services/settings/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.settings.v0" url: /grpc_apis/ocis_services_settings_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/store/v0/grpc.md b/grpc_apis/ocis/services/store/v0/grpc.md index 0c5fa6fc6a7..979dc2d3bc3 100644 --- a/grpc_apis/ocis/services/store/v0/grpc.md +++ b/grpc_apis/ocis/services/store/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.store.v0" url: /grpc_apis/ocis_services_store_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/thumbnails/v0/grpc.md b/grpc_apis/ocis/services/thumbnails/v0/grpc.md index 4d3cb20e119..c9883af7d79 100644 --- a/grpc_apis/ocis/services/thumbnails/v0/grpc.md +++ b/grpc_apis/ocis/services/thumbnails/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.thumbnails.v0" url: /grpc_apis/ocis_services_thumbnails_v0 -date: 2022-11-29T14:03:36Z +date: 2022-11-29T15:20:35Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/ocis/development/deprecating-variables.md b/ocis/development/deprecating-variables.md new file mode 100644 index 00000000000..e61549b5b8f --- /dev/null +++ b/ocis/development/deprecating-variables.md @@ -0,0 +1,39 @@ +--- +title: "Deprecating Variables" +date: 2022-11-29T15:41:00+01:00 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/ocis/development +geekdocFilePath: deprecating-variables.md +--- + +{{< toc >}} + +## Deprecating Environment Variables + +Sometimes it is necessary to deprecate environment to align their naming with +conventions. We therefore added annotations to automate the documentation +process. It is necessary to know when the variable is going to be deprecated, +when it is going to be removed and why. + +### Example + +```golang +// Nats is the nats config +type Nats struct { +Host string `yaml:"host" env:"NATS_HOST_ADDRESS;NATS_NATS_HOST" desc:"Bind address." deprecationVersion:"1.6.2" removalVersion:"1.7.5" deprecationInfo:"NATS_NATS_HOST is confusing" deprecationReplacement:"NATS_HOST_ADDRESS"` +... +} +``` + +There are four different annotation variables that need to be filled: + +| Annotation |Description| Format| +|---|---|---| +| depreactionVersion| The version the variable will be deprecated| semver (e.g. 1.6.2)| +| removalVersion| The version the variable will be removed from the codebase| semver (e.g. 1.7.3)| +| deprecationInfo| Information why the variable is deprecated, must start with the name of the variable in order to avoid confusion, when there are multiple options in the `env:`-field | string (e.g. NATS_NATS_HOST is confusing) | +| depreactionReplacement | The name of the variable that is going to replace the deprecated on.| string (e.g. NATS_HOST_ADDRESS)| + +### What happens next? + +Once a variable has been finally removed, the annotations must be removed again from the code, since they do not serve any purpose from this point. \ No newline at end of file