SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

sap.ui.model.ContextBinding docs missing a method #1720

Closed lmcarreiro closed 2 years ago

lmcarreiro commented 7 years ago

Method getBoundContext() of the type sap.ui.model.ContextBinding that is used in the Master-Detail example from Demo Apps in SDK Demo Kit, I've checked on the docs and this method doesn't exist.

Checking the code, this method do exists: https://github.com/SAP/openui5/blob/3a212d2b66e7935986b5507c5f520c99ec645497/src/sap.ui.core/src/sap/ui/model/ContextBinding.js

For some reason, the API docs didn't have it. I would make a pull request to fix this, but I'm not sure how these docs are generated. I didn't found a .library xml with it. Are they all generated from JsDoc comments?

lmcarreiro commented 7 years ago

Is it because it is not on the metadata.publicMethods array?

codeworrior commented 7 years ago

The method has been documented with 75038405f413d5bbaadb9a14809c86d9c3c1aa1c which will be part of the 1.52 release. That's why you find the method documented in the code but not in the API reference (hana.ondemand.com still shows 1.48).

This has nothing to do with the "publicMethods".

Please check https://openui5nightly.hana.ondemand.com/#/api/sap.ui.model.ContextBinding/methods/getBoundContext , there it appears already.

lmcarreiro commented 7 years ago

The same is happening with sap.ui.model.Binding's getPath() method, that is used in the example too.

But in this case, it is not in the docs, even in https://openui5nightly.hana.ondemand.com/#/api/sap.ui.model.Binding

codeworrior commented 7 years ago

Correct. Most methods in Binding.js are not marked as @public and therefore don't appear in the API reference. I'll reopen this issue.

BTW: I forgot to answer a question from your first post: the API reference is extracted from the JSdoc comments and - regarding all the 'managed' features like properties and aggregations - it is also taken from the 'metadata' literal. The only main difference between standard JSdoc and JSdoc in UI5 is that we decided for @ private as default.

flovogt commented 2 years ago

Fixed by https://github.com/SAP/openui5/commit/bbb52fb711a8127384ac5ceb4ae3de271200ca9e.