class EnvironmentRestApi {

  @GET
  @Path("/{id}")
  @Operation(summary = "Find environment by name",
          tags = {"environment"},
          responses = {
                  @ApiResponse(description = "successful operation", 
                      content = @Content(
                          schema = @Schema(implementation = Environment.class))),
                  @ApiResponse(
                      responseCode = "404", 
                      description = "Environment not found")})
  public Response getEnvironment(
      @PathParam(RestConstants.ENVIRONMENT_ID) String name) {
    try {
      Environment environment = environmentManager.getEnvironment(name);
      return new JsonResponse.Builder<Environment>(Response.Status.OK)
          .success(true).result(environment).build();
    } catch (SubmarineRuntimeException e) {
      return parseEnvironmentServiceException(e);
    }
  }

}