Working with a private widget api, and was expecting to see some api documentation generated for it. Private Widget Api link
Should there be?
Working with a private widget api, and was expecting to see some api documentation generated for it. Private Widget Api link
Should there be?
By nature a private API is private and not meant for consumption outside of its context. Generating documentation would be counter to that idea
um... yes.. maybe I need to think about that..
if a different person needs to work with the private api with the widget that is in the right context, they will need to read the source code to figure it out. they being me...
is there away to make it public until it's ready to be made private?
well.. now I get it... The reference in the link above has it as "$private.Value" I followed along, and set my Extension name to "some_context" and in velocity I can use "$some_context.Value" so I can still use the public WidgetApi setup for it too. I am using a widget to fill the Explicit Panel. I will need to remember how to make the widget private too. I found out the hard way that our privileged users will reuse these widgets if you don't make them private. something to do with the context settings.
thanks... and it make sense to keep this out of our generated Widget API documentation.
Good question.
"Private" APIs exposed to widgets in IScriptablePlugins are indeed auto-documented within Widget Studio's documentation panel and autocomplete suggestions when viewed from within the associated plugin's widgets, the same as the platform's public APIs, and they'll even be identified with a "private" tag.
The only "gotcha" is to ensure that the custom api object exposed via IContextualScriptedContentFragmentExtension.GetExtension(NameValueCollection) should be able to return an object instance even with a null or empty NameValueCollection passed to GetExtension(). The resulting object, even if unusable in that state, is reflected upon to know the documentable private API details.
The generated documentation should automatically document your private $some_context API as well, there's just a gotcha to be aware of - detailed below.