In Documenting your APIs with the Atlassian REST API Browser I read that to make a REST service appear as public API I need to use the PublicApi (or ExperimentalApi) annotation. Unfortunately this does not make my REST services to appear in the public section of the REST API Browser. Instead I need to unmark the checkbox to find them in the private section.
Yesterday I realized by accident that when I change the path of may REST services from “/projectdoc” to “/api/projectdoc” the services will be recognized as public. When I tried the same trick with another module “/projectdoc-maven” to “/api/projectdoc-maven” it fails (the service is still considered private). If I change it to “/api/projectdoc/maven” or “/api/projectdoc_maven” it will be considered public. But “/api/projectdocmaven” will not.
So this is the configuration in may atlassian-plugin.xml (with a version that works to mark the services as public):
<rest
name="projectdoc Maven Extension Web-API"
key="projectdocMavenExtensionWebAPI"
path="/api/projectdoc_maven"
version="1">
<description>Web access to projectdoc Maven resources.</description>
<package>de.smartics.projectdoc.extension.maven.webapi</package>
</rest>
And this is the annotation I use on my REST resource:
com.atlassian.annotations.PublicApi
Is there something obvious I do overlook (some additional configuration to be made in a config file or in the Java sources)? Does the “/api” prefix have some special meaning? Can somebody point me to some documentation or an example that publishes its REST resources marked as public successfully?
I am using Confluence 5.10.8.