-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change document and link id in request (#815)
* refactor: document id as object instead of String * refactor: documentId for delete document * refactor: improve display error message when document Id does not exist * Update DocumentsResources.java * refactor:delete document and delete link object instead of String * refactor: PUT /link/id object instead of String * refactor:add sanitize * test: add new tests for documents services * tests: clean codeLists tests * fix: * refactor: place of constant * refactor
- Loading branch information
Showing
7 changed files
with
332 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/fr/insee/rmes/config/swagger/model/operations/documentation/DocumentId.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package fr.insee.rmes.config.swagger.model.operations.documentation; | ||
|
||
public class DocumentId { | ||
private String id; | ||
|
||
public DocumentId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getDocumentId() { | ||
return id; | ||
} | ||
|
||
public String getString() { | ||
if (id != null && !id.isEmpty()) { | ||
return id; | ||
} | ||
else{ | ||
return null; //without this it might cause some trouble to test with new DocumentID(null) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.