Skip to content
Snippets Groups Projects

Fpo/openapi json cleaner maven plugin

Merged Florent Poittevin requested to merge fpo/openapi-cleaner-maven-plugin into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
24
25 @Test
26 public void testRun() {
27 readFile();
28
29 JSONObject jsonBeforeCleanup = copyJsonObject(jsonCleaner.json);
30 jsonCleaner.run(servletContextPath);
31 JSONObject jsonAfterCleanup = jsonCleaner.json;
32
33 assertNotNull(jsonAfterCleanup);
34 assertEquals(jsonBeforeCleanup.length(), jsonAfterCleanup.length());
35 assertEquals(getPathsNode(jsonBeforeCleanup).length(), getPathsNode(jsonAfterCleanup).length());
36 assertEquals(getSchemasNode(jsonBeforeCleanup).length(), getSchemasNode(jsonAfterCleanup).length());
37
38 try {
39 jsonCleaner.generate("src/test/resources/"+ fileToTest + "-cleaned.json");
  • Hugues.Cazeaux
  • 1 package ch.dlcm;
  • Hugues.Cazeaux
  • 40 lstModules.add("dlcm-admin");
    41 lstModules.add("dlcm-access");
    42 lstModules.add("dlcm-archival-storage");
    43 lstModules.add("dlcm-data-mgmt");
    44 lstModules.add("dlcm-ingest");
    45 lstModules.add("dlcm-preingest");
    46 lstModules.add("dlcm-resource-srv");
    47 lstModules.add("dlcm-preservation-planning");
    48 return lstModules;
    49 }
    50
    51 public void load(String inputFilePath) throws FileNotFoundException {
    52 File file = new File(inputFilePath);
    53 FileInputStream fileInputStream = new FileInputStream(file);
    54 try {
    55 String jsonTxt = IOUtils.toString(fileInputStream);
  • Florent Poittevin mentioned in merge request !2 (merged)

    mentioned in merge request !2 (merged)

  • Please register or sign in to reply
    Loading