Fix Partially Deprecated APIs
This skill fixes partially deprecated API usage that the UI5 linter detects but cannot auto-fix because they require understanding the specific deprecated variant being used.
Quick Reference
Linter Rules Handled
When to Use
Apply this skill when you see linter output like:
Fix Strategies
1. Parameters.get - Old Variant
Problem: Calling Parameters.get() without an object parameter.
Fix Strategy: Use object parameter with callback.
2. JSONModel.loadData - Deprecated Parameters
Problem: Using bAsync=false or bCache=false in loadData().
Fix Strategy: Use async loading (default) and remove cache parameter.
3. Mobile.init - Deprecated Parameters
Problem: Using homeIcon or homeIconPrecomposed in Mobile.init().
Fix Strategy: Remove the deprecated parameters.
Alternative: Define home screen icons in your web app manifest:
4. ODataModel.v2.createEntry - Deprecated Parameters
Problem: Using batchGroupId or properties as array in createEntry().
Fix Strategy: Use groupId and pass properties as object with initial values.
5. View.create - Deprecated View Types
Problem: Creating views with deprecated types (JS, JSON, HTML, Template).
Fix Strategy: Convert to XML view type.
Note: This requires converting your JS/JSON/HTML view file to an XML view file.
6. Fragment.load - Deprecated Fragment Type
Problem: Loading fragments with HTML type.
Fix Strategy: Convert to XML fragment.
7. Router Constructor - Missing async Flag
Problem: Creating Router without async: true.
Fix Strategy: Set async: true in the config.
Note: Most apps use the Component's built-in router via manifest.json, which handles this automatically when IAsyncContentCreation is implemented in Component.js (see fix-component-async skill).
8. String Formatter in JS Bindings
Problem: Using string value for formatter in JavaScript.
Fix Strategy: Use function reference.
Note: String formatters work in XML views (resolved at runtime) but not in JS where you have direct access to the function.
Notes
- These are "partially" deprecated because only specific usage patterns are deprecated, not the entire API
- Always check
npx @ui5/linter --detailsfor links to modernization documentation - View/Fragment type changes require converting the actual view/fragment files to XML
- The Router
async: trueis automatically handled when usingIAsyncContentCreationin Component.js (seefix-component-asyncskill for correct placement)


