[ofbiz-plugins] branch trunk updated: Improved: Corrected formatting(OFBIZ-11995)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-plugins] branch trunk updated: Improved: Corrected formatting(OFBIZ-11995)

grv-2
This is an automated email from the ASF dual-hosted git repository.

grv pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 93f5b6f  Improved: Corrected formatting(OFBIZ-11995)
93f5b6f is described below

commit 93f5b6f4fb09c7e558c8a1615e97175d9316e198
Author: Girish Vasmatkar <[hidden email]>
AuthorDate: Tue Sep 15 17:57:37 2020 +0530

    Improved: Corrected formatting(OFBIZ-11995)
---
 .../org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java   | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java
index 95a50bf..480aa2a 100644
--- a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java
+++ b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java
@@ -89,7 +89,7 @@ public final class OFBizOpenApiReader extends Reader implements OpenApiReader {
         return openApi;
     }
 
-    //TODO - Add method contents
+    // TODO - Add method contents
     private void addApiResources() {
     }
 
@@ -106,11 +106,9 @@ public final class OFBizOpenApiReader extends Reader implements OpenApiReader {
                 SecurityRequirement security = new SecurityRequirement();
                 security.addList("jwtToken");
                 final Operation operation = new Operation().summary(service.getDescription())
-                        .description(service.getDescription()).addTagsItem("Exported Services").operationId(service.getName())
-                        .deprecated(false).addSecurityItem(security);
-
+                        .description(service.getDescription()).addTagsItem("Exported Services")
+                        .operationId(service.getName()).deprecated(false).addSecurityItem(security);
                 PathItem pathItemObject = new PathItem();
-
                 if (service.getAction().equalsIgnoreCase(HttpMethod.GET)) {
                     final QueryParameter serviceInParam = (QueryParameter) new QueryParameter().required(true)
                             .description("Service In Parameters in JSON").name("inParams");
@@ -118,7 +116,6 @@ public final class OFBizOpenApiReader extends Reader implements OpenApiReader {
                     refSchema.$ref("#/components/schemas/" + "api.request." + service.getName());
                     serviceInParam.schema(refSchema);
                     operation.addParametersItem(serviceInParam);
-
                 } else if (service.getAction().equalsIgnoreCase(HttpMethod.POST)) {
                     RequestBody request = new RequestBody().description("Request Body for service " + service.getName())
                             .content(new Content().addMediaType(javax.ws.rs.core.MediaType.APPLICATION_JSON,
@@ -133,17 +130,16 @@ public final class OFBizOpenApiReader extends Reader implements OpenApiReader {
             }
         }
     }
+
     private void initializeStdOpenApiComponents() {
         if (openApi.getTags() != null) {
             openApiTags.addAll(openApi.getTags());
         }
-
         Tag serviceResourceTag = new Tag().name("Exported Services")
                 .description("OFBiz services that are exposed via REST interface with export attribute set to true");
         openApiTags.add(serviceResourceTag);
         openApi.setTags(new ArrayList<Tag>(openApiTags));
         components = openApi.getComponents();
-
         if (components == null) {
             components = new Components();
         }