Skip to content

docs: document isExtend FQN contract - #753

Merged
tangcent merged 1 commit into
masterfrom
style/endpoint-builder-cleanup
Aug 24, 2026
Merged

docs: document isExtend FQN contract#753
tangcent merged 1 commit into
masterfrom
style/endpoint-builder-cleanup

Conversation

@tangcent

@tangcent tangcent commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Documents the FQN contract on both script-facing isExtend declarations (ClassContext, ScriptTypeContext): the superClass argument must be the fully qualified name; a simple name silently never matches
  • Fixes the method.return.main rule example in EndpointBuilder that used a bare "Result" — the exact mistake the contract docs now prevent
  • Drops redundant ApiHeader / ApiParameter imports in EndpointBuilder (both types live in the same package core.export)

Testing

  • No runtime behavior change (imports + KDoc only)
  • Verified via full-repo search that the fixed example was the only isExtend/isInheritor call site passing a simple class name; all other usages (including built-in .config rule files such as jackson.config and *-validation-strict.config) already pass fully qualified names, traced through annValue/annMaps normalization (type.canonicalText) and qualifiedName() sources

Risks / Rollback

None — zero behavioral impact. Revert the commit to roll back.

@github-actions github-actions Bot added the type: chore Routine maintenance task label Aug 24, 2026
@tangcent tangcent changed the title style(export): drop redundant imports and fix rule doc example Drop redundant imports and document isExtend FQN contract Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download easy-api-3.1.9.252.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown.

isExtend delegates to InheritanceHelper.isInheritor, which matches
fully qualified class names only — a simple name like "Result"
silently never matches. The method.return.main rule example in
EndpointBuilder encoded exactly that mistake, so fix it and state
the contract on both script-facing declarations (ClassContext and
ScriptTypeContext) where rule authors see it in IDE quick docs.

Also drop the redundant ApiHeader/ApiParameter imports in
EndpointBuilder — both types live in the same package (core.export),
so the imports were unnecessary.

Comments and imports only; no runtime behavior changes.
@tangcent
tangcent force-pushed the style/endpoint-builder-cleanup branch from 63826e7 to c5a54bb Compare August 24, 2026 04:49
@tangcent tangcent changed the title Drop redundant imports and document isExtend FQN contract docs: document isExtend FQN contract Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download easy-api-3.1.9.252.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown.

@github-actions github-actions Bot added type: doc Document task and removed type: chore Routine maintenance task labels Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Plugin has been packaged for this PR. You can download easy-api-3.1.9.252.0.zip from the GitHub Actions workflow run by clicking on the "Artifacts" dropdown.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.795%. Comparing base (64292af) to head (c5a54bb).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #753   +/-   ##
=========================================
  Coverage   66.795%   66.795%           
=========================================
  Files          442       442           
  Lines        25936     25936           
  Branches      6191      6191           
=========================================
  Hits         17324     17324           
  Misses        6291      6291           
  Partials      2321      2321           
Flag Coverage Δ
unittests 66.795% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...m/itangcent/easyapi/core/export/EndpointBuilder.kt 79.808% <ø> (ø)
...ent/easyapi/core/rule/context/ScriptPsiContexts.kt 49.573% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64292af...c5a54bb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tangcent
tangcent merged commit 1506efc into master Aug 24, 2026
12 checks passed
@tangcent
tangcent deleted the style/endpoint-builder-cleanup branch August 24, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: doc Document task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant