I'm hesitating, the thing is that what webjars really want to know in
practice is the namespace since that what it will provide to
ClassLoaderManager so maybe the best is to indicate the namespace
instead of the wiki in the URL. It means that webjar service can
support both wiki and users right now and any future namespaces
(document, space, etc).

On Fri, Apr 8, 2016 at 9:06 AM, Vincent Massol <[email protected]> wrote:
> Hi devs,
>
> In order to fix http://jira.xwiki.org/browse/XWIKI-13276, I’m proposing:
>
> * Use Case 1: No wiki specified:
>
> $services.webjars.url('org.xwiki.contrib:application-ckeditor-webjar', 
> 'ckeditor.js’)
>
> would generate:
>
> /<context>/webjars/<currentWikiId>/application-ckeditor-webjar/1.4/ckeditor.js
>
> * Use Case 2: Wiki specified:
>
> $services.webjars.url('org.xwiki.contrib:application-ckeditor-webjar', 
> 'ckeditor.js', {'wiki': 'mywiki’)
>
> would generate
>
> /<context>/webjars/mywiki/application-ckeditor-webjar/1.4/ckeditor.js
>
> Generic format:
>
> /<context>/webjars/<wikiId>/path/to/resource
>
> WDYT?
>
> I prefer this over having to deal with domain vs path-based; I also find it 
> more clear.
>
> Thanks
> -Vincent
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to