config: generate model code from json schema by codeboten · Pull Request #4879 · open-telemetry/opentelemetry-python

@codeboten

Proposing that the first step towards implementing OpenTelemetry Configuration is to
produce the model code from the json schema. I did a quick search for tools available
to do this and came across datamodel-codegen which seems to do what i expected.

Will open following pull requests (in draft) to use this model code, i just want
to keep these as clearly separated as possible to make reviewing them easier.

Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>

xrmx

@MikeGoldsmith

@MikeGoldsmith

… into codeboten/generate-config-model-from-schema

@MikeGoldsmith

@MikeGoldsmith

…el-from-schema

fix code-generation command and regenerate models

@MikeGoldsmith

@MikeGoldsmith

@MikeGoldsmith

…el-from-schema.2

Fix lint errors and update uv.lock file
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>

This was referenced

Feb 6, 2026
… into codeboten/generate-config-model-from-schema
datamodel-codegen section was inserted between [tool.pyright] and its
include/exclude config, causing pyright to check entire repo (599 files)
instead of just included paths. Moved datamodel-codegen section after
pyright config.

@MikeGoldsmith

@MikeGoldsmith

… into codeboten/generate-config-model-from-schema

@MikeGoldsmith

@MikeGoldsmith

… into codeboten/generate-config-model-from-schema
…com:codeboten/opentelemetry-python into codeboten/generate-config-model-from-schema

@MikeGoldsmith

@MikeGoldsmith

@MikeGoldsmith

… into codeboten/generate-config-model-from-schema

@MikeGoldsmith

pmcollins

pmcollins

pmcollins

@codeboten

@MikeGoldsmith

@codeboten

xrmx

xrmx approved these changes Mar 2, 2026

@xrmx

@xrmx xrmx enabled auto-merge (squash)

March 2, 2026 09:16

@MikeGoldsmith MikeGoldsmith deleted the codeboten/generate-config-model-from-schema branch

March 2, 2026 09:30