Bringing the discussion that began in the comments of #44170 to a dedicated issue.
The comments from plugin developers in #44170 show clear and growing support for io-ts. However, it's not clear how those teams will be affected by @kbn/config-schema and the New Platform.
I believe some time should be taken to research the needs which led to io-ts adoption and how those needs can be addressed in the New Platform as well as outlining any migration plan or possible way teams can keep the same benefits (runtime type safety, etc) they currently have.
A search for io-ts shows usage by @elastic/infra-logs-ui, @elastic/apm-ui, @elastic/siem, @elastic/beats
ack -l "'io-ts'" x-pack/
x-pack/legacy/plugins/infra/server/lib/adapters/log_entries/kibana_log_entries_adapter.ts
x-pack/legacy/plugins/infra/server/lib/sources/sources.ts
x-pack/legacy/plugins/infra/server/lib/sources/types.ts
x-pack/legacy/plugins/infra/server/lib/log_analysis/log_analysis.ts
x-pack/legacy/plugins/infra/common/runtime_types.ts
x-pack/legacy/plugins/infra/common/http_api/shared/errors.ts
x-pack/legacy/plugins/infra/common/http_api/shared/time_range.ts
x-pack/legacy/plugins/infra/common/http_api/shared/metric_statistics.ts
x-pack/legacy/plugins/infra/common/http_api/metadata_api.ts
x-pack/legacy/plugins/infra/common/http_api/log_analysis/results/log_entry_rate.ts
x-pack/legacy/plugins/infra/common/log_analysis/log_analysis.ts
x-pack/legacy/plugins/infra/public/containers/metrics/with_metrics_time.tsx
x-pack/legacy/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.tsx
x-pack/legacy/plugins/infra/public/containers/source_id/source_id.ts
x-pack/legacy/plugins/infra/public/containers/logs/log_analysis/log_analysis_results_url_state.tsx
x-pack/legacy/plugins/infra/public/containers/logs/log_analysis/api/ml_get_jobs_summary_api.ts
x-pack/legacy/plugins/infra/public/containers/logs/log_analysis/api/ml_setup_module_api.ts
x-pack/legacy/plugins/infra/public/containers/logs/log_analysis/api/ml_cleanup_everything.ts
x-pack/legacy/plugins/infra/public/containers/logs/log_analysis/ml_api_types.ts
x-pack/legacy/plugins/apm/server/routes/traces.ts
x-pack/legacy/plugins/apm/server/routes/default_api_types.ts
x-pack/legacy/plugins/apm/server/routes/errors.ts
x-pack/legacy/plugins/apm/server/routes/create_api/index.test.ts
x-pack/legacy/plugins/apm/server/routes/create_api/index.ts
x-pack/legacy/plugins/apm/server/routes/settings.ts
x-pack/legacy/plugins/apm/server/routes/transaction_groups.ts
x-pack/legacy/plugins/apm/server/routes/typings.ts
x-pack/legacy/plugins/apm/server/routes/ui_filters.ts
x-pack/legacy/plugins/apm/server/routes/services.ts
x-pack/legacy/plugins/apm/server/routes/metrics.ts
x-pack/legacy/plugins/apm/common/runtime_types/json_rt/index.test.ts
x-pack/legacy/plugins/apm/common/runtime_types/json_rt/index.ts
x-pack/legacy/plugins/apm/common/runtime_types/date_as_string_rt/index.ts
x-pack/legacy/plugins/apm/common/runtime_types/transaction_sample_rate_rt/index.ts
x-pack/legacy/plugins/beats_management/server/lib/adapters/framework/adapter_types.ts
x-pack/legacy/plugins/beats_management/common/io_ts_types.ts
x-pack/legacy/plugins/beats_management/common/domain_types.ts
x-pack/legacy/plugins/beats_management/common/config_block_validation.ts
x-pack/legacy/plugins/beats_management/public/lib/adapters/framework/adapter_types.ts
x-pack/legacy/plugins/siem/server/utils/typed_resolvers.ts
x-pack/legacy/plugins/siem/server/lib/note/types.ts
x-pack/legacy/plugins/siem/server/lib/pinned_event/types.ts
x-pack/legacy/plugins/siem/server/lib/timeline/types.ts
Here's a comment from @elastic/apm-ui and another comment from @elastic/infra-logs-ui
Pinging @elastic/kibana-platform
Just catching up on this full thread. Can someone who is more familiar with io-ts than I am try to clearly enumerate what io-ts does now that the current version of config-schema can't do? @jfsiii / @weltenwort / @dgieselaar / @sqren ?
From my point of view there's three advantages at the moment:
fp-ts behind it.It works both on the client side and the server side, which Joi doesn't.
It seems that new Joi version works in browser: https://github.com/hapijs/joi/issues/2037
@restrry Yes, but the footprint is pretty big, something around 160kb IIRC.
We discussed this topic and made a decision to decouple request validation from the @kbn/config-schema package in the short-term. Closing this issue in favor of #50179
Most helpful comment
We discussed this topic and made a decision to decouple request validation from the
@kbn/config-schemapackage in the short-term. Closing this issue in favor of #50179