问题
Migrating from WSO2 AM 1.10 to 2.0. Won't mention all the obstacles I've had to overcame. But this one is pretty obvious and I am really stunned that this went overlooked/ignored by the developers before releasing the new version. Let's ignore all the bugs with CSRF, BUT this one sucks arse, too: Grouping and categorizing. WSO2 documents have not been updated since the last release, which is kinda sad.
BUG 1: Grouping does not work unless all the subdirs (in Carbon) under "tags" dir are lowercased regardless of the original names / tags with -group suffices.
BUG 2: The tags with "-group" suffix are displayed in the left panel (the "tag cloud"). Ehm.
BUG 3: Group tags [displayed] at the Store are lowercased and contain "-group" suffices (mixture of both bugs from above).
BUG 4: Groups do not support white spaces (in the tag cloud). When clicked, the groups appear empty.
Any ideas / workarounds?
回答1:
As you observed,there's a bug in AM 2.0.0 when you defined the API categories with upper-case or with white spaces.
I have created the public jira[1] to track the progress and fix by next coming release.
I checked the possibilities of avoiding these issues and found that showing the category names in tag cloud can be avoid by a sub theme while other two issues with upper case & white spaces have to be fixed from code level.
To fix ,categories showing in tag cloud,you can download the template.jag attached in [1] and add it to sub theme folder location "AM/repository/deployment/server/jaggeryapps/store/site/themes/{your_subtheme_name}/templates/tag/tag-cloud" as a sub theme template file with following [2].
[1] https://wso2.org/jira/browse/APIMANAGER-5425 [2] https://docs.wso2.com/display/AM200/Adding+a+New+API+Store+Theme#AddingaNewAPIStoreTheme-Writingasubthemeofthemaintheme
来源:https://stackoverflow.com/questions/39842306/wso2-api-manager-categorising-and-grouping-apis