diff --git a/README.md b/README.md index 2ef7edb..80d4d06 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,14 @@ Add in VMArguments to run in an IDE -Dspring.profiles.active=local +### Development data + +You can use the file [data.sql](src/test/resources/db/data/data.sql) to insert data to your local db. + +### Cleaning DB + +All data volume is mapped to directory `tmp`. You can delete this folder to get rid of development data. + ## How to run You can run with maven @@ -44,7 +52,7 @@ tip: --rm parameter will exclude container image after execution and it cause da ### Writing Tests -If you wanna use db connection on your test you must extend the class `AbstractIntegrationTest`. This class will run the docker container and configure the spring datasource. +If you want to use db connection on your test you must extend the class `AbstractIntegrationTest`. This class will run the docker container and configure the spring datasource. ## How to contribute diff --git a/openapi.yaml b/openapi.yaml index 066a446..5c66ed0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -44,7 +44,7 @@ paths: - Author /cordels/summaries: get: - summary: "Retrieve all cordels by pages" + summary: "Retrieve all summaries by pages" parameters: - name: page in: query @@ -95,7 +95,7 @@ paths: - Cordel /cordels/{id}: get: - summary: "Get a specific cordel with all content" + summary: "Get a cordel with full content" parameters: - name: "id" in: "path" diff --git a/pom.xml b/pom.xml index 451c2ae..01c3345 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ br.com.itsmemario ecordel - 0.7.0-SNAPSHOT + 1.0.0-SNAPSHOT e-cordel e-reader for cordels diff --git a/src/main/java/br/com/itsmemario/ecordel/xilogravura/XilogravuraService.java b/src/main/java/br/com/itsmemario/ecordel/xilogravura/XilogravuraService.java index 159d078..095a1bb 100644 --- a/src/main/java/br/com/itsmemario/ecordel/xilogravura/XilogravuraService.java +++ b/src/main/java/br/com/itsmemario/ecordel/xilogravura/XilogravuraService.java @@ -40,17 +40,15 @@ public XilogravuraService(FileManager fileManager) { public String createXilogravuraWithFile(MultipartFile file){ try { -// todo move this code to file manager? - String fileName = generateRandomFileName(); + var fileName = generateRandomFileName(); return fileManager.saveFile(file.getBytes(), fileName); } catch (IOException e) { - e.printStackTrace(); throw new FileProcessException("Error while saving file", e); } } private String generateRandomFileName() { - return UUID.randomUUID().toString() + JPG; + return UUID.randomUUID() + JPG; } }