Skip to content

Generate documentation for imported external nested fields#814

Merged
jsoriano merged 3 commits intoelastic:mainfrom
jsoriano:include-nested-fields-in-docs
May 10, 2022
Merged

Generate documentation for imported external nested fields#814
jsoriano merged 3 commits intoelastic:mainfrom
jsoriano:include-nested-fields-in-docs

Conversation

@jsoriano
Copy link
Member

@jsoriano jsoriano commented May 9, 2022

While trying to remove duplicated fields to introduce package-spec 1.8.0 I found that sub-fields of external fields of type group were being included in the built fields files, but not in the documentation.

This PR attempts to address a couple of incoherences found with external fields, documentation and final generated field files:

  • Fields imported as subfields of external fields are being included in the built package, but not in the documentation.
  • Fields of type group, or that contain subfields are handled differently between defined and external fields:
    • Defined groups are not included in the docs, but their sub-fields are.
    • External groups are included in the docs, but their sub-fields aren't.

An alternative could be to don't import sub-fields of external groups, but this change could be breaking as it would modify the fields actually included in the mappings. The approach in this PR solves the incoherences by modifying only the docs, what shouldn't be breaking.

@jsoriano jsoriano added the Team:Ecosystem Label for the Packages Ecosystem team label May 9, 2022
@jsoriano jsoriano self-assigned this May 9, 2022
@jsoriano jsoriano requested a review from a team May 9, 2022 17:18
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 9, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-05-09T17:28:27.798+0000

  • Duration: 27 min 8 sec

Test stats 🧪

Test Results
Failed 0
Passed 699
Skipped 0
Total 699

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Collaborator

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (30/30) 💚
Files 64.22% (70/109) 👍
Classes 58.278% (88/151) 👍
Methods 47.466% (281/592) 👍
Lines 32.011% (2574/8041) 👍
Conditionals 100.0% (0/0) 💚

@jsoriano jsoriano changed the title Import documentation of external nested fields Generate documentation for imported external nested fields May 10, 2022
@jsoriano jsoriano merged commit 6b03219 into elastic:main May 10, 2022
@jsoriano jsoriano deleted the include-nested-fields-in-docs branch May 10, 2022 08:23
jsoriano added a commit to jsoriano/elastic-package that referenced this pull request May 12, 2022
jsoriano added a commit that referenced this pull request May 12, 2022
…817)

Revert "Generate documentation for imported external nested fields (#814)"

This reverts commit 6b03219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Ecosystem Label for the Packages Ecosystem team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants