Skip to content

fix(builder): JSDoc: avoid errors when symbol has no events#1329

Open
maxreichmann wants to merge 2 commits intomainfrom
fix/jsdoc/AvoidErrorForSymbolWithNoEvents
Open

fix(builder): JSDoc: avoid errors when symbol has no events#1329
maxreichmann wants to merge 2 commits intomainfrom
fix/jsdoc/AvoidErrorForSymbolWithNoEvents

Conversation

@maxreichmann
Copy link
Member

@maxreichmann maxreichmann commented Mar 20, 2026

This is a fix for a bug which initially has been fixed in v4 (SAP/ui5-builder#1162) but not upported to v5 yet. This fix also resolves the error occurrence found when running ui5 build jsdoc in the UI5/sample-app.
This will add a unit test for transformApiJson.js covering this scenario.

@maxreichmann maxreichmann force-pushed the fix/jsdoc/AvoidErrorForSymbolWithNoEvents branch from 858a8d0 to c3b47d0 Compare March 20, 2026 11:08
Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
@maxreichmann maxreichmann force-pushed the fix/jsdoc/AvoidErrorForSymbolWithNoEvents branch from d84dc84 to 6afbf3a Compare March 20, 2026 12:57
@codeworrior
Copy link
Member

While I like the idea of unit tests in general, I think it is a bad idea to have this test only in the @ui5/cli. The transformApiJson is mainly developed in openui5/lib/jsdoc. If the test does not exist there, risk is high that the next sync from openui5 to @ui5/cli gets unnecessarily difficult. I would in general prefer to make openui5/lib/jsdoc the single source of truth and the copy here just a copy.

There is even a test for the transformer, but it's located in a different place (for historical reasons, I guess)

  • sapui5.runtime/src/dist/docbuilder-maven-plugin/src/test/tools/node/test/test-transformer.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants