From d629f9b3d40084114d1f8e71c118abaeca9d1f75 Mon Sep 17 00:00:00 2001 From: Lars Johansson <lars.johansson@ess.eu> Date: Fri, 18 Mar 2022 17:05:18 +0100 Subject: [PATCH] Hide validation endpoints for names, structures --- .../java/org/openepics/names/rest/api/v1/INames.java | 8 ++++++-- .../org/openepics/names/rest/api/v1/IStructures.java | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/openepics/names/rest/api/v1/INames.java b/src/main/java/org/openepics/names/rest/api/v1/INames.java index a70b1649..bd9f7b86 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/INames.java +++ b/src/main/java/org/openepics/names/rest/api/v1/INames.java @@ -34,6 +34,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; +import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; @@ -106,8 +107,8 @@ public interface INames { read GET /names/{name} - both name and uuid (name - exact and search, uuid exact) */ - public static final String DEFAULT_PAGE = "0"; - public static final String DEFAULT_PAGE_SIZE = "100"; + public static final String DEFAULT_PAGE = "0"; + public static final String DEFAULT_PAGE_SIZE = "100"; /** * Create names by list of name elements. @@ -429,6 +430,7 @@ public interface INames { * @param nameElements list of name elements * @return if list of name elements is valid to create */ + @Hidden @Operation( summary = "Return if name elements are valid to create", description = "Return if name elements are valid to create. " @@ -470,6 +472,7 @@ public interface INames { * @param nameElements list of name elements * @return if list of name elements is valid to update */ + @Hidden @Operation( summary = "Return if name elements are valid to update", description = "Return if name elements are valid to update. " @@ -511,6 +514,7 @@ public interface INames { * @param nameElements list of name elements * @return if list of name elements is valid to delete */ + @Hidden @Operation( summary = "Return if name elements are valid to delete", description = "Return if name elements are valid to delete. " diff --git a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java index a64c6334..3b6917fe 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java +++ b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java @@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; +import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; @@ -113,8 +114,8 @@ public interface IStructures { update PATCH /structures/reject - rejectStructures (List<StructureElement>) */ - public static final String DEFAULT_PAGE = "0"; - public static final String DEFAULT_PAGE_SIZE = "100"; + public static final String DEFAULT_PAGE = "0"; + public static final String DEFAULT_PAGE_SIZE = "100"; /** * Create (propose) structures by list of structure elements. @@ -451,6 +452,7 @@ public interface IStructures { * @param structureElements list of structure elements * @return if list of structure elements is valid to create (propose) */ + @Hidden @Operation( summary = "Return if structure elements are valid to create (propose)", description = "Return if structure elements are valid to create (propose). " @@ -494,6 +496,7 @@ public interface IStructures { * @param structureElements list of structure elements * @return if list of structure elements is valid to update (propose) */ + @Hidden @Operation( summary = "Return if structure elements are valid to update (propose)", description = "Return if structure elements are valid to update (propose). " @@ -537,6 +540,7 @@ public interface IStructures { * @param structureElements list of structure elements * @return if list of structure elements is valid to delete (propose) */ + @Hidden @Operation( summary = "Return if structure elements are valid to delete (propose)", description = "Return if structure elements are valid to delete (propose). " @@ -580,6 +584,7 @@ public interface IStructures { * @param structureElements list of structure elements * @return if list of structure elements is valid to approve */ + @Hidden @Operation( summary = "Return if structure elements are valid to approve", description = "Return if structure elements are valid to approve. " @@ -623,6 +628,7 @@ public interface IStructures { * @param structureElements list of structure elements * @return if list of structure elements is valid to cancel */ + @Hidden @Operation( summary = "Return if structure elements are valid to cancel", description = "Return if structure elements are valid to cancel. " @@ -666,6 +672,7 @@ public interface IStructures { * @param structureElements list of structure elements * @return if list of structure elements is valid to reject */ + @Hidden @Operation( summary = "Return if structure elements are valid to reject", description = "Return if structure elements are valid to reject. " -- GitLab