Skip to content

Commit

Permalink
removing swagger code when swagger option is disabled in the model.
Browse files Browse the repository at this point in the history
  • Loading branch information
jadelkhoury committed Jan 19, 2023
1 parent 1351bfa commit 8e15458
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -70,8 +70,9 @@ import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException;
import org.eclipse.lyo.oslc4j.core.model.ResourceShape;
import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory;

[if (anAdaptorInterface.swaggerDocumentationEnabled())]
import io.swagger.v3.oas.annotations.Operation;

[/if]
import [javaClassFullNameForAdaptorApplication(anAdaptorInterface)/];

// [protected ('imports')]
Expand All @@ -97,7 +98,9 @@ public class [javaClassNameForResourceShapeService(anAdaptorInterface)/]
@GET
@Path("{resourceShapePath}")
@Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML, OslcMediaType.APPLICATION_JSON, OslcMediaType.TEXT_TURTLE})
@Operation(hidden = true)
[if (anAdaptorInterface.swaggerDocumentationEnabled())
] @Operation(hidden = true)
[/if]
public ResourceShape getResourceShape(@Context final HttpServletRequest httpServletRequest,
@PathParam("resourceShapePath") final String resourceShapePath)
throws OslcCoreApplicationException,
Expand Down

0 comments on commit 8e15458

Please sign in to comment.