Skip to content

[4/5] VSA: Slim Configuration to YAML schema; organize root namespaces#3347

Merged
Mpdreamz merged 7 commits into
refactor/slim-elastic-documentationfrom
refactor/organize-doc-namespaces
May 19, 2026
Merged

[4/5] VSA: Slim Configuration to YAML schema; organize root namespaces#3347
Mpdreamz merged 7 commits into
refactor/slim-elastic-documentationfrom
refactor/organize-doc-namespaces

Conversation

@Mpdreamz
Copy link
Copy Markdown
Member

@Mpdreamz Mpdreamz commented May 18, 2026

Why

Elastic.Documentation.Configuration was accumulating types that have nothing to do with YAML schema parsing — a domain interface, a security utility, CLI options, and dead code. Elastic.Documentation's root namespace had the same drift: version types, changelog enums, and a CLI options class all living next to cross-cutting primitives with no structural signal about their purpose. Reviewers and future contributors had no way to distinguish schema types from infrastructure types without reading each file.

What

Elastic.Documentation.Configuration is trimmed to YAML schema and deserializer wiring only. IEnvironmentVariables and SymlinkValidator move to Elastic.Documentation (domain primitives); CrossLinkEntry and DocSetRegistry move into the existing Builder/ sub-namespace; the dead LenientStringListConverter (zero references, contradicted by its own doc-comment) is deleted. ElasticsearchEndpointConfigurator stays in Configuration due to a dependency cycle (Configuration → Tooling already exists).

Elastic.Documentation's root namespace is pruned to genuine cross-cutting primitives. ChangelogEntryType and ChangelogEntrySubtype move into the existing ReleaseNotes/ sub-namespace; SemVersion, VersionSpec, and VersionOrDate move to a new Versions/ sub-namespace; GlobalCliOptions moves to Elastic.Documentation.Tooling (preserving the Elastic.Documentation namespace via pragma, so ~60 consumer files need only a using update, not a project-reference change).

All consumer changes are mechanical using directive additions — no logic was touched.


Part of a move to vertical slice architecture to be able to cleanly lift search contract:

  1. [1/5] VSA: Merge Elastic.Documentation.Api.* into single project #3333 — Merge Elastic.Documentation.Api.* into single project
  2. [2/5] VSA: Collapse Gateway+Usecase into *Service per feature #3335 — Collapse Gateway+Usecase into *Service per feature
  3. [3/5] VSA: Slim Elastic.Documentation, extract heavy deps to Tooling #3345 — Slim Elastic.Documentation, extract heavy deps to Tooling
  4. [4/5] VSA: Slim Configuration to YAML schema; organize root namespaces #3347 — Slim Configuration to YAML schema; organize root namespaces
  5. [5/5] VSA: Extract Elastic.Documentation.Search.Contract as zero-dep library #3350 — Extract Elastic.Documentation.Search.Contract as zero-dep library

Elastic.Documentation.Configuration now contains only YAML schema types
and deserializer wiring. Non-schema types are relocated: IEnvironmentVariables
and SymlinkValidator move to Elastic.Documentation (domain primitives);
CrossLinkEntry and DocSetRegistry move into the existing Builder/ sub-namespace;
the dead LenientStringListConverter is deleted.

Elastic.Documentation root namespace is pruned: ChangelogEntryType and
ChangelogEntrySubtype move to the existing ReleaseNotes/ sub-namespace;
SemVersion, VersionSpec, and VersionOrDate move to a new Versions/
sub-namespace; GlobalCliOptions moves to Elastic.Documentation.Tooling
(preserving the Elastic.Documentation namespace via pragma so consumers
need only a using-directive update, not a project-reference change).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Mpdreamz Mpdreamz requested a review from a team as a code owner May 18, 2026 18:25
@Mpdreamz Mpdreamz added the chore label May 18, 2026
@Mpdreamz Mpdreamz requested a review from reakaleek May 18, 2026 18:25
@Mpdreamz Mpdreamz added the chore label May 18, 2026
Mpdreamz and others added 3 commits May 18, 2026 20:55
…nfiguration

Centralizes all YAML file reading in Elastic.Documentation.Configuration.
The five serialization types (ChangelogConfigurationYaml, YamlLenientList,
YamlLenientListConverter, TypeEntryYamlConverter) and ChangelogConfigurationLoader
move from Elastic.Changelog into Configuration.Changelog/, registered in the
shared YamlStaticContext so the single-static-context-per-assembly constraint
is respected. Elastic.Changelog consumers drop the old using directives; no new
project references are needed since Changelog already references Configuration.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
GlobalCliOptions moved here in PR4 and carries the Argh doc-comment
shortnames/summaries that populate the CLI schema. Without
GenerateDocumentationFile=true those annotations are invisible to the
schema generator, making the schema diff fail in CI.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Mpdreamz and others added 2 commits May 19, 2026 09:12
website-search-data needs the DocumentationDocument shape and mapping config
without pulling in the full Elastic.Documentation assembly (YAML loading, AppliesTo
parsing, link registries, etc.). The new project has zero ProjectReferences and
a single NuGet dep (Elastic.Mapping), making it safe to take as a standalone dep.

DocumentationDocument.Applies changes from ApplicableTo? to
IReadOnlyCollection<AppliesToEntry>, eliminating the AppliesTo project dep from the
contract. ApplicableTo.ToAppliesTo() centralises the conversion so the wire-format
is defined in exactly one place.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Mpdreamz Mpdreamz changed the title [4/4] VSA: Slim Configuration to YAML schema; organize root namespaces [4/5] VSA: Slim Configuration to YAML schema; organize root namespaces May 19, 2026
…library (#3350)

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Mpdreamz Mpdreamz merged commit 1ccaf54 into refactor/slim-elastic-documentation May 19, 2026
7 checks passed
@Mpdreamz Mpdreamz deleted the refactor/organize-doc-namespaces branch May 19, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants