Skip to content

List every schema an allOf merges in API reference - #4314

Closed
akira28 wants to merge 2 commits into
api-explorer-unions/allof-oneoffrom
api-explorer-unions/allof-multi-ref
Closed

akira28 wants to merge 2 commits into
api-explorer-unions/allof-oneoffrom
api-explorer-unions/allof-multi-ref

Conversation

@akira28

@akira28 akira28 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

A property whose allOf merges several $ref schemas now lists the extra ones in an "Also includes" line. Before, only the first schema appeared.

Affects: API reference

Prompt summary: Improve how the API Explorer renders anyOf, oneOf and allOf, one fix per stacked PR. This PR covers the second: allOf with more than one $ref.

Why

The type label of an allOf names only its first $ref. The other members still contribute properties to the list below, but nothing says where they come from.

What

"Also includes" line

A property row lists the remaining object schemas of an allOf after the first, as links when they have their own page. Enums and primitive aliases are left out, because they say nothing about the object's shape. A single-$ref allOf is unchanged.

Markdown export

The Markdown output writes the same list as Also includes: …, so the HTML and Markdown views stay in step.

Type information

TypeInfo carries the extra schemas as AlsoIncludes. ApiPropertyTreeBuilder turns them into links for ApiProperty.

Verify

dotnet test tests/Elastic.ApiExplorer.Tests/
# BuildPropertyList_AllOfWithSeveralRefs_ListsTheOtherSchemasAsAlsoIncludes

Out of scope: the schema pages (SchemaView) and the CSS for the new row, which reuses existing classes. I haven't viewed the rendered row in a browser.

Stack: 2 of 2, on top of #4313.

🤖 Generated with Claude Code

@akira28
akira28 added this pull request to stack #4315 October 6, 2026 06:34
@akira28 akira28 changed the title List every schema an allOf merges in the API Explorer List every schema an allOf merges in API reference Oct 6, 2026
@akira28
akira28 force-pushed the api-explorer-unions/allof-multi-ref branch from 2c192bf to d333862 Compare October 6, 2026 07:02
@akira28
akira28 force-pushed the api-explorer-unions/allof-oneof branch from f0557e4 to 632b3a4 Compare October 6, 2026 07:02
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4314/

@akira28
akira28 force-pushed the api-explorer-unions/allof-oneof branch from 632b3a4 to 416c4e5 Compare October 6, 2026 11:31
@akira28
akira28 force-pushed the api-explorer-unions/allof-multi-ref branch from d333862 to c7b4898 Compare October 6, 2026 11:31
@akira28
akira28 marked this pull request as ready for review October 6, 2026 11:42
@akira28
akira28 requested a review from a team as a code owner October 6, 2026 11:42
@akira28
akira28 requested a review from Mpdreamz October 6, 2026 11:42
Comment thread src/Elastic.ApiExplorer/Model/SchemaAnalyzer.cs
@akira28
akira28 force-pushed the api-explorer-unions/allof-oneof branch from 416c4e5 to 9fa12ac Compare October 6, 2026 13:14
@akira28
akira28 force-pushed the api-explorer-unions/allof-multi-ref branch from c7b4898 to 5d209b6 Compare October 6, 2026 13:14
akira28 and others added 2 commits October 6, 2026 15:34
An `allOf` with several `$ref` members showed only the first as the type, so the others were invisible. Property rows now add an "Also includes" line for the remaining object schemas, in HTML and Markdown.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An `allOf` that repeated its first `$ref` listed that schema under "Also includes", although it already names the type. The list now leaves out the primary schema.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@akira28
akira28 force-pushed the api-explorer-unions/allof-multi-ref branch from 5d209b6 to 3c0a6d8 Compare October 6, 2026 13:35
@akira28
akira28 force-pushed the api-explorer-unions/allof-oneof branch from 9fa12ac to 35db829 Compare October 6, 2026 13:35
@akira28
akira28 removed this pull request from stack #4315 October 6, 2026 13:51
@akira28

akira28 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #4327, which joins all seven PRs of this stack into one. The commits and the resolved review threads carry over.

@akira28 akira28 closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant