Date: | Author: | Version: | Changes: | Completed | Ext. | Int. | Is in Core | Jira Ref. |
---|---|---|---|---|---|---|---|---|
0.1 | Doc. created | Yes/No | x |
| N/A |
| ||
14/04-2016 | Anders Granau Høfft | 0.2 | Sections expanded | No | x | N/A | CDRRM-733 | |
11 May 2016 | Emil Ifrim | 0.3 | Database configuration | No | x | N/A | ||
20 March 2017 | Emil Ifrim | 0.4 | Redesign Update | No | x | N/A |
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.cdrator.projects.customer_project</groupId> <artifactId>customer_project</artifactId> <version>3.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>customer_project-rest-parent</artifactId> <packaging>pom</packaging> <name>customer_project REST modules</name> <description>customer_project REST modules</description> <properties> <failOnMissingWebXml>false</failOnMissingWebXml> </properties> <modules> <module>core-rest-app</module> <module>customer-rest-app</module> <module>rest-api-auth-app</module> </modules> <dependencyManagement> <dependencies> <dependency> <!-- Jboss logging that is used by hibernate-validator has a conflict with the one used by jdiameter --> <groupId>${project.groupId}</groupId> <artifactId>customer_project-billing</artifactId> <version>${project.version}</version> <scope>runtime</scope> <exclusions> <exclusion> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> </exclusion> <exclusion> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging</artifactId> </exclusion> <exclusion> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging-spi</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.cdrator.core</groupId> <artifactId>rator-billing</artifactId> <scope>runtime</scope> <version>${com.cdrator.core.version}</version> <exclusions> <exclusion> <artifactId>servlet-api</artifactId> <groupId>javax.servlet</groupId> </exclusion> <exclusion> <groupId>org.apache.bval</groupId> <artifactId>bval-jsr303</artifactId> </exclusion> <exclusion> <groupId>org.ow2.asm</groupId> <artifactId>asm-all</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>18.0</version> </dependency> </dependencies> </dependencyManagement> <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> <plugin> <groupId>com.ning.maven.plugins</groupId> <artifactId>maven-duplicate-finder-plugin</artifactId> <configuration> <ignoredResources combine.children="append"> <ignoredResource>META-INF/validation-configuration-1.0.xsd</ignoredResource> <ignoredResource>META-INF/validation-mapping-1.0.xsd</ignoredResource> <ignoredResource>META-INF/additional-spring-configuration-metadata.json</ignoredResource> <ignoredResource>META-INF/spring-configuration-metadata.json</ignoredResource> <ignoredResource>META-INF/spring.factories</ignoredResource> <ignoredResource>META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat</ignoredResource> </ignoredResources> </configuration> </plugin> </plugins> </build> </project> |
...
- Retrieve the
rator-selfcare-rest-api
.war file (either from Jenkins/Nexus, see Resources, or by building the .war yourself, see Build). - Retrieve the
rator-rest-api-auth
.war file (either from Jenkins/Nexus, see Resources, or by building the .war yourself, see Build). - Copy the war files to the Tomcat webapps directory and (re-)start the Tomcat application.
- Retrieve the swagger-ui
dist
folder (either from Github, or from our own repositories, see Resources. Or by building the project yourself, see Build). - Copy the dist folder to the Tomcat
webapps
directory and (re-)start the Tomcat application. You probably want to rename thedist
folder toswagger-ui
.- Nb This can be a different Tomcat installation than in step 2, or the same.
- In your browser, enter the URL "http://<Swagger server and port>/<base-path>/?url=http://<REST server and port>/<base-path>/api/swagger.json".
- You should now see a list of the resources available on the REST server.
In order to access secure resources through swagger-ui, two additional parameters must be configured in the Properties.txt file:
Code Block language sql title oauth2 selfcare client rest.api.accessTokenUri=http://<host>:<port/<auth-app-context>/oauth/token #example: http://10.45.1.81:8081/rator-rest-api-auth/oauth/token rest.api.userAuthorizationUri=http://<host>:<port/<auth-app-context>/oauth/authorize #example: http://10.45.1.81:8081/rator-rest-api-auth/oauth/authorize
...