Merge pull request #3736 from guusdk/api-documentation

Improving the generated REST API documentation
This commit is contained in:
Stian Thorgersen 2017-02-20 15:30:32 +01:00 committed by GitHub
commit faf0e98665
28 changed files with 49 additions and 16 deletions

View file

@ -31,7 +31,7 @@
<description /> <description />
<properties> <properties>
<version.swagger.doclet>1.0.5</version.swagger.doclet> <version.swagger.doclet>1.1.2</version.swagger.doclet>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
</properties> </properties>
@ -205,6 +205,16 @@
<url>http://jcenter.bintray.com</url> <url>http://jcenter.bintray.com</url>
</repository> </repository>
</repositories> </repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</pluginRepository>
</pluginRepositories>
<build> <build>
<plugins> <plugins>
@ -244,29 +254,24 @@
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.redowlanalytics</groupId> <groupId>io.github.swagger2markup</groupId>
<artifactId>swagger2markup-maven-plugin</artifactId> <artifactId>swagger2markup-maven-plugin</artifactId>
<version>0.7.1</version> <version>1.1.0</version>
<dependencies>
<dependency>
<groupId>io.github.robwin</groupId>
<artifactId>swagger2markup</artifactId>
<version>0.7.1</version>
</dependency>
</dependencies>
<executions> <executions>
<execution> <execution>
<id>gen-asciidoc</id> <id>gen-asciidoc</id>
<phase>process-resources</phase> <phase>process-resources</phase>
<goals> <goals>
<goal>process-swagger</goal> <goal>convertSwagger2markup</goal>
</goals> </goals>
<configuration> <configuration>
<inputDirectory>${project.basedir}/target/apidocs-rest/swagger/apidocs</inputDirectory> <swaggerInput>${project.build.directory}/apidocs-rest/swagger/apidocs/service.json</swaggerInput>
<outputDirectory>${project.basedir}/target/apidocs-rest/asciidoc</outputDirectory> <outputDir>${project.build.directory}/apidocs-rest/asciidoc/</outputDir>
<markupLanguage>asciidoc</markupLanguage> <config>
<swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
<swagger2markup.pathsGroupedBy>TAGS</swagger2markup.pathsGroupedBy>
</config>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
@ -275,7 +280,7 @@
<plugin> <plugin>
<groupId>org.asciidoctor</groupId> <groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId> <artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.2</version> <version>1.5.3</version>
<executions> <executions>
<execution> <execution>
<id>generate-docs</id> <id>generate-docs</id>
@ -293,6 +298,7 @@
https://github.com/asciidoctor/asciidoctorj/blob/master/asciidoctorj-core/src/main/java/org/asciidoctor/Attributes.java https://github.com/asciidoctor/asciidoctorj/blob/master/asciidoctorj-core/src/main/java/org/asciidoctor/Attributes.java
--> -->
<toc/> <toc/>
<toc-position>left</toc-position>
<generated>${project.basedir}/target/apidocs-rest/asciidoc</generated> <generated>${project.basedir}/target/apidocs-rest/asciidoc</generated>
</attributes> </attributes>
</configuration> </configuration>

View file

@ -42,6 +42,7 @@ import java.util.Map;
/** /**
* Base resource class for the admin REST api of one realm * Base resource class for the admin REST api of one realm
* *
* @resource Attack Detection
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -73,6 +73,7 @@ import java.util.Map;
import static javax.ws.rs.core.Response.Status.NOT_FOUND; import static javax.ws.rs.core.Response.Status.NOT_FOUND;
/** /**
* @resource Authentication Management
* @author Bill Burke * @author Bill Burke
*/ */
public class AuthenticationManagementResource { public class AuthenticationManagementResource {

View file

@ -62,6 +62,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @resource Client Attribute Certificate
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -43,6 +43,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
/** /**
* @resource Client Initial Access
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/ */
public class ClientInitialAccessResource { public class ClientInitialAccessResource {

View file

@ -39,6 +39,7 @@ import org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy;
import org.keycloak.services.clientregistration.policy.ClientRegistrationPolicyFactory; import org.keycloak.services.clientregistration.policy.ClientRegistrationPolicyFactory;
/** /**
* @resource Client Registration Policy
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a> * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/ */
public class ClientRegistrationPolicyResource { public class ClientRegistrationPolicyResource {

View file

@ -82,6 +82,7 @@ import static java.lang.Boolean.TRUE;
/** /**
* Base resource class for managing one particular client of a realm. * Base resource class for managing one particular client of a realm.
* *
* @resource Clients
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -49,6 +49,7 @@ import java.util.Properties;
import java.util.Set; import java.util.Set;
/** /**
* @resource Client Role Mappings
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -47,6 +47,7 @@ import javax.ws.rs.core.UriInfo;
/** /**
* Base resource class for managing one particular client of a realm. * Base resource class for managing one particular client of a realm.
* *
* @resource Client Templates
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -46,6 +46,7 @@ import java.util.List;
/** /**
* Base resource class for managing a realm's client templates. * Base resource class for managing a realm's client templates.
* *
* @resource Client Templates
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -58,6 +58,7 @@ import java.util.Properties;
/** /**
* Base resource class for managing a realm's clients. * Base resource class for managing a realm's clients.
* *
* @resource Clients
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -65,6 +65,7 @@ import java.util.Properties;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* @resource Component
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -51,6 +51,7 @@ import java.util.Set;
import org.keycloak.services.ErrorResponse; import org.keycloak.services.ErrorResponse;
/** /**
* @resource Groups
* @author Bill Burke * @author Bill Burke
*/ */
public class GroupResource { public class GroupResource {

View file

@ -42,6 +42,7 @@ import java.util.List;
import org.keycloak.services.ErrorResponse; import org.keycloak.services.ErrorResponse;
/** /**
* @resource Groups
* @author Bill Burke * @author Bill Burke
*/ */
public class GroupsResource { public class GroupsResource {

View file

@ -65,6 +65,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @resource Identity Providers
* @author Pedro Igor * @author Pedro Igor
*/ */
public class IdentityProviderResource { public class IdentityProviderResource {

View file

@ -58,6 +58,7 @@ import java.util.Map;
import static javax.ws.rs.core.Response.Status.BAD_REQUEST; import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
/** /**
* @resource Identity Providers
* @author Pedro Igor * @author Pedro Igor
*/ */
public class IdentityProvidersResource { public class IdentityProvidersResource {

View file

@ -36,6 +36,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @resource Key
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/ */
public class KeyResource { public class KeyResource {

View file

@ -55,6 +55,7 @@ import java.util.Properties;
/** /**
* Base resource for managing users * Base resource for managing users
* *
* @resource Protocol Mappers
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -102,6 +102,7 @@ import java.util.regex.PatternSyntaxException;
/** /**
* Base resource class for the admin REST api of one realm * Base resource class for the admin REST api of one realm
* *
* @resource Realms Admin
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -54,6 +54,7 @@ import java.util.List;
/** /**
* Top level resource for Admin REST API * Top level resource for Admin REST API
* *
* @resource Realms Admin
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -45,6 +45,7 @@ import java.util.Set;
/** /**
* Sometimes its easier to just interact with roles by their ID instead of container/role-name * Sometimes its easier to just interact with roles by their ID instead of container/role-name
* *
* @resource Roles (by ID)
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -48,6 +48,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
/** /**
* @resource Roles
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -59,6 +59,7 @@ import java.util.Set;
/** /**
* Base resource for managing users * Base resource for managing users
* *
* @resource Role Mapper
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -33,6 +33,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
/** /**
* @resource Roles
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -43,6 +43,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
/** /**
* @resource Scope Mappings
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -50,6 +50,7 @@ import java.util.Set;
/** /**
* Base class for managing the scope mappings of a specific client. * Base class for managing the scope mappings of a specific client.
* *
* @resource Scope Mappings
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -46,6 +46,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @resource User Storage Provider
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */

View file

@ -107,6 +107,7 @@ import java.util.concurrent.TimeUnit;
/** /**
* Base resource for managing users * Base resource for managing users
* *
* @resource Users
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */