docs(reference): switch typed-API migration guide to elasticsearch.NewTypedFrom#1475
Merged
Merged
Conversation
4 tasks
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
🔍 Preview links for changed docs |
Contributor
Vale Linting ResultsSummary: 1 warning, 3 suggestions found
|
| File | Line | Rule | Message |
|---|---|---|---|
| docs/reference/low-level-api/migration.md | 257 | Elastic.DontUse | Don't use 'just'. |
💡 Suggestions (3)
| File | Line | Rule | Message |
|---|---|---|---|
| docs/reference/low-level-api/migration.md | 280 | Elastic.WordChoice | Consider using 'deactivate, deselect, hide, turn off' instead of 'disable', unless the term is in the UI. |
| docs/reference/low-level-api/migration.md | 302 | Elastic.Semicolons | Use semicolons judiciously. |
| docs/reference/typed-api/index.md | 55 | Elastic.Ellipses | In general, don't use an ellipsis. |
The Vale linter checks documentation changes against the Elastic Docs style guide.
To use Vale locally or report issues, refer to Elastic style guide for Vale.
Contributor
Binary size vs
|
| Variant | Base | PR | Delta | % |
|---|---|---|---|---|
| base | 9.04 MB | 9.04 MB | +0.00 MB | 0.00% |
| client | 69.80 MB | 69.80 MB | +0.00 MB | 0.00% |
| typed | 50.64 MB | 50.64 MB | +0.00 MB | 0.00% |
All binaries within +10% of base.
Contributor
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| markdownlint | 2 | 4 | 0 | 0.65s | ||
| ✅ REPOSITORY | gitleaks | yes | no | no | 33.16s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.7s |
Detailed Issues
⚠️ MARKDOWN / markdownlint - 4 errors
docs/reference/low-level-api/migration.md:306:401 MD013/line-length Line length [Expected: 400; Actual: 510]
docs/reference/low-level-api/migration.md:314:401 MD013/line-length Line length [Expected: 400; Actual: 530]
docs/reference/low-level-api/migration.md:318:401 MD013/line-length Line length [Expected: 400; Actual: 417]
docs/reference/typed-api/index.md:55:401 MD013/line-length Line length [Expected: 400; Actual: 571]
See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff
MegaLinter is graciously provided by OX Security
…wTypedFrom Updates docs/reference/low-level-api/migration.md and docs/reference/typed-api/index.md to reference the new elasticsearch.NewTypedFrom(c) free function instead of the removed (*Client).ToTyped() method, and adds a v9.4.0 -> v9.4.1 migration block under "Get a full typed client from an existing low-level client" explaining the rename, the binary-size rationale, and why NewTypedFrom is a free function rather than a method. Depends on the (*Client).ToTyped() removal in #1474.
c19c115 to
90af589
Compare
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.
Summary
Updates the typed-API reference documentation for the
(*Client).ToTyped()→elasticsearch.NewTypedFrom(c)migration introduced in #1474.Two files touched:
docs/reference/low-level-api/migration.md: rewrites the "Get a full typed client from an existing low-level client" section aroundelasticsearch.NewTypedFrom. Adds a "Migrating from v9.4.0" subsection explaining the rename and the binary-size rationale, and notes why the replacement is a free function rather than a method.docs/reference/typed-api/index.md: updates a cross-link fromclient.ToTyped()toelasticsearch.NewTypedFrom(client).Depends on: #1474. That PR removes
(*Client).ToTyped()and addselasticsearch.NewTypedFrom. Land it first so this doc is not describing a non-existent API.Test plan
typed-api/index.md→low-level-api/migration.mdstill anchors correctly.Note on branch name
The branch is still named
docs/1472-bridge-totyped-migrationfrom an earlier design iteration that exposed the conversion via atypedapi/bridgesub-package. The final design (matching #1474) is a single free functionelasticsearch.NewTypedFrom. The branch name doesn't affect the squash-merged commit.