-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#258 - Add an endpoint that takes a structured query and validates it
- Return invalid criteria (termcode/context) instead of just termcode - Replace old /validate endpoint with the new one - add swagger documentation for the endpoint - When no invalid terms are found, return an empty array instead of omitting the parameter - Don't include the invalid terms list in the structured query itself but create a new object ValidatedStructuredQuery, containing the original query and the list of invalid terms - Add a new endpoint that takes a structured query and sends back the same query with additional invalidTerms if present
- Loading branch information
1 parent
32ddf69
commit 59b460a
Showing
7 changed files
with
129 additions
and
15 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
15 changes: 15 additions & 0 deletions
15
src/main/java/de/numcodex/feasibility_gui_backend/query/api/ValidatedStructuredQuery.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,15 @@ | ||
package de.numcodex.feasibility_gui_backend.query.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import de.numcodex.feasibility_gui_backend.common.api.Criterion; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record ValidatedStructuredQuery( | ||
@JsonProperty StructuredQuery query, | ||
@JsonProperty List<Criterion> invalidCriteria | ||
) { | ||
|
||
} |
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
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