Update S3P documentation
[policy/parent.git] / docs / development / devtools / devtools.rst
index ab57cd2..c84fb74 100644 (file)
@@ -13,7 +13,6 @@ Policy Platform Development Tools
 
 This article explains how to build the ONAP Policy Framework for development purposes and how to run stability/performance tests for a variety of components. To start, the developer should consult the latest ONAP Wiki to familiarize themselves with developer best practices and how-tos to setup their environment, see `https://wiki.onap.org/display/DW/Developer+Best+Practices`.
 
-
 This article assumes that:
 
 * You are using a *\*nix* operating system such as linux or macOS.
@@ -27,7 +26,7 @@ The procedure documented in this article has been verified to work on a MacBook
 Cloning All The Policy Repositories
 ***********************************
 
-Run a script such as the script below to clone the required modules from the `ONAP git repository <https://gerrit.onap.org/r/#/admin/projects/?filter=policy>`_. This script clones all the ONAP Policy Framework repositories.
+Run a script such as the script below to clone the required modules from the `ONAP git repository <https://gerrit.onap.org/r/admin/repos/q/filter:policy>`_. This script clones all the ONAP Policy Framework repositories.
 
 ONAP Policy Framework has dependencies to the ONAP Parent *oparent* module, the ONAP ECOMP SDK *ecompsdkos* module, and the A&AI Schema module.
 
@@ -246,7 +245,7 @@ Another example on how to run the MariaDb is using the docker compose file used
 `Example Compose Script to run MariaDB <https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=scripts/policy/docker-compose-api.yml;h=e32190f1e6cb6d9b64ddf53a2db2c746723a0c6a;hb=refs/heads/master>`_
 
 Running the API component standalone
-+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
 
 Assuming you have successfully built the codebase using the instructions above. The only requirement for the API component to run is a
 running MariaDb database instance. The easiest way to do this is to run the docker image, please see the mariadb documentation for the latest
@@ -266,7 +265,7 @@ An example of running the api using a docker compose script is located in the Po
 `Policy CSIT API Docker Compose <https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob;f=scripts/policy/docker-compose-api.yml;h=e32190f1e6cb6d9b64ddf53a2db2c746723a0c6a;hb=refs/heads/master>`_
 
 Running the PAP component standalone
-+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
 
 Once you have successfully built the PAP codebase, a running MariaDb database and DMaaP instance will also be required to start up the application.
 For MariaDb instance, the easiest way is to run the docker image, please see the mariadb documentation for the latest
@@ -311,6 +310,7 @@ familiar with the Policy Framework components and test any local changes.
 .. toctree::
    :maxdepth: 1
 
+   run-s3p.rst
    api-s3p.rst
    pap-s3p.rst
    apex-s3p.rst
@@ -409,57 +409,7 @@ To test these images, CSITs will be run.
 Generating Swagger Documentation
 ********************************
 
-1. Using Swagger2Markup maven plugin from Policy Parent Integration POM
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-The `Policy Parent Integration POM <https://github.com/onap/policy-parent/blob/master/integration/pom.xml>`_ contains a *generateSwaggerDocs* profile. This
-profile can be activated on any module that has a Swagger endpoint. When active, this profile creates a tarball in Nexus with the name
-*<project-artifactId>-swagger-docs.tar.gz*. The tarball contains the following files:
-
-.. code-block:: bash
-
-    swagger/swagger.html
-    swagger/swagger.json
-    swagger/swagger.pdf
-
-The profile is activated when:
-
-1. The following property is defined at the top of the *pom.xml* file for a module
-
-    .. code-block:: bash
-
-        <!--  This property triggers generation of the Swagger documents -->
-        <swagger.generation.phase>post-integration-test</swagger.generation.phase>
-
-    See the `CLAMP runtime POM <https://github.com/onap/policy-clamp/blob/master/runtime/pom.xml>`_ for an example of the usage of this property.
-
-2. Unit tests are being executed in the build, in other words when the *skipTests* flag is *false*.
-
-You **must** create a unit test in your module that generates the following file:
-
-.. code-block:: bash
-
-    src/test/resources/swagger/swagger.json
-
-Typically, you do this by starting your REST endpoint in a unit test, issuing a REST call to get the Swagger API documentation. The test case below is an example
-of such a test case.
-
-.. code-block:: java
-
-   @Test
-   public void testSwaggerJson() throws Exception {
-       ResponseEntity<String> httpsEntity = getRestTemplate()
-               .getForEntity("https://localhost:" + this.httpsPort + "/restservices/clds/api-doc", String.class);
-       assertThat(httpsEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
-       assertThat(httpsEntity.getBody()).contains("swagger");
-       FileUtils.writeStringToFile(new File("target/swagger/swagger.json"), httpsEntity.getBody(),
-               Charset.defaultCharset());
-   }
-
-See `this unit test case <https://github.com/onap/policy-clamp/blob/master/runtime/src/test/java/org/onap/policy/clamp/clds/it/HttpsItCase.java>`_
-for the full example.
-
-2. Accessing Swagger documentation for springboot based policy applications
+1. Accessing Swagger documentation for springboot based policy applications
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 Springfox Swagger2 maven dependency aids with auto-generation of Swagger documentation.