Repository navigation
Label the API map row property name* instead of <string> - #5024
Merged
Merged
Conversation
The row that holds a map's value fields read `<string>` in the name column, so it looked like a field named `<string>` of type `object`. The parent row already says `map string to object`. Redoc, Swagger UI and Bump.sh all mark this row with an asterisk and no type placeholder. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A map body and a map on a `oneOf` variant get their key row from `WithDictionaryKeyRow`, which adds a property named `<string>` to a plain property list. That row skipped the new label and still read `<string>`. `_MapKeyLabel` now draws the row's label, and the plain row path uses it for `ApiProperty.IsMapKey`, so one map reads the same wherever it appears. Review finding on the PR. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/5024/ |
The collapsed request-body summary listed a map body's key row as `<string>`, while the expanded tree reads `property name*`. The summary now takes each row's `DisplayName`, which `ApiProperty` derives from the same constant the key row partial uses. Review finding on the PR. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
When union variants share a map value, a later variant links back to the first key row with "Same fields as". The link read `<string>`, though the row it points at reads `property name*`. `RepeatedShape` now has a `DisplayName` for the page and keeps its raw `Name`, so the Markdown export is unchanged. Review finding on the PR. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A row's permalink is announced as "Link to" plus its JSON path or name, so a screen reader still heard `<string>` for a map key, such as `Link to tags.<string>`. The path now reads `*` for the key, as the visible row does, and a key row with no path reads `property name*`. The tooltip keeps the full path. Review finding on the PR. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
reakaleek
marked this pull request as draft
November 23, 2026 22:32
The permalink label replaced every `<string>` in the JSON path, so a field such as `settings.value<string>` was announced as `settings.value*` even with no map in the path. A segment now reads as a map key only when it is `<string>`, with any `[]` after it. Review finding on the PR. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A permalink to a root map's key row was announced as `Link to *`, which a screen reader can skip. The map key in a permalink now reads `additional property`, the same words the row shows beside its label, and a key row with no path reads the same. `MapKeyKind` holds the words for both. Review finding on the PR. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The hover tooltip on a row shows its JSON path, and `*` is how JSONPath writes "any key". A path through a map read `tags.<string>`, which is only our internal marker for the search index. The tooltip now reads `tags.*`. The marker and the index are unchanged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The row that lists a map's value fields in API property trees now reads
property name*with anadditional propertylabel, in place of a<string>chip. It no longer looks like a field named<string>.Affects: API reference
Prompt summary: Explain why the autoscaling capacity response shows
<string>of typeobject, which looks wrong, and note that Bump.sh shows it differently. The author then asked for research on how other API docs label this row and picked the best label for ours.Why
policiesin theautoscaling.get_autoscaling_capacityresponse is a map:additionalPropertiespoints at an object schema. The tree builder adds one row under a map to hold the value's fields, and it labelled that row<string>in the name column. Next to the typeobject, it read as a field called<string>. It also repeated thestringalready in the parent'smap string to object.Other API docs avoid this. A rendered check shows what each one does with the same kind of schema:
property name*additional property< * >additionalProp1)*Additional propertiesAll three mark the row with an asterisk. None puts a type placeholder in the name column. Redoc's wording is the only one that says what the row is without prior knowledge, so this PR follows it. The
additional propertylabel also matches the OpenAPI termadditionalProperties.What
The map row label
The row under a map now shows
property name*in the name column and a mutedadditional propertylabel after it. One partial,_MapKeyLabel, draws it. The label reuses the existingvalues-labelstyle, so there is no new CSS. The hover tooltip shows the JSON path with*, the JSONPath wildcard, for the key (policies.*).What stays the same
ApiPropertyPath.MapKeyMarker(<string>) is still the marker in JSON paths and in the search index, so indexed field paths do not change. Row anchors such as#query-tags-stringstay, so existing deep links keep working. The Markdown export still saysMap values (object), because plain text for LLMs reads better with words than with an asterisk.Map bodies and union variants
A map at the root of a body, and a map on a
oneOfvariant, get their key row from a property that the builder names<string>. That row goes through the regular property path, soApiProperty.IsMapKeysends it to the same partial. A map reads the same wherever it appears in a schema.Summary, links and permalinks
Other text that named the key row now agrees with it. The collapsed request-body summary lists
property name*for a map body. A "Same fields as" link to a key row readsproperty name*. A permalink announces the key asadditional property, such asLink to aggs.additional property.terms, so a screen reader never hears<string>or skips a bare*. Only a whole<string>segment counts, so a field such asvalue<string>keeps its name. The Markdown export keeps the raw names.Snapshots
Render_ReferencedMapParameter_ShowsKeyRowInQuerySection.verified.htmlshows the new row, and new snapshots cover a map body, a map on a union variant, and the repeat link.Verify
Check on the preview
policiesanddecidersreadproperty name*with anadditional propertylabel.🤖 Generated with Claude Code