Skip to content

Commit

Permalink
release(v1.3.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 20, 2023
1 parent b231669 commit 36d4510
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>The API for the FEEL-Scala Playground</description>

<artifactId>feel-scala-playground</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.3.2</version>

<parent>
<groupId>org.camunda.community</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.camunda.feel.playground.api;

import java.util.ArrayList;
import java.util.List;
import org.camunda.feel.api.EvaluationResult;
import org.camunda.feel.playground.dto.FeelEvaluationRequest;
import org.camunda.feel.playground.dto.FeelEvaluationResponse;
Expand All @@ -17,9 +19,6 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/api/v1")
@CrossOrigin()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public void setMessage(String message) {
}

public static FeelEvaluationWarning of(String type, String message) {
final var warning = new FeelEvaluationWarning();
warning.type = type;
warning.message = message;
return warning;
final var warning = new FeelEvaluationWarning();
warning.type = type;
warning.message = message;
return warning;
}

@Override
Expand Down
26 changes: 13 additions & 13 deletions src/test/java/org/camunda/feel/playground/FeelApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ void shouldReturnContext() throws Exception {
.andExpect(content().json("{'result': {'x': 1}}"));
}

@Test
void shouldReturnEvaluationWarnings() throws Exception {
mvc.perform(
post("/api/v1/feel/evaluate")
.contentType(MediaType.APPLICATION_JSON)
.content("{\"expression\": \"x\", \"context\": {}}"))
.andExpect(status().isOk())
.andExpect(content().json(
"{'result': null, 'warnings': [{'type': \"NO_VARIABLE_FOUND\", 'message': \"No variable found with name 'x'\"}]}"
));
}

@Test
void shouldReturnEvaluationWarnings() throws Exception {
mvc.perform(
post("/api/v1/feel/evaluate")
.contentType(MediaType.APPLICATION_JSON)
.content("{\"expression\": \"x\", \"context\": {}}"))
.andExpect(status().isOk())
.andExpect(
content()
.json(
"{'result': null, 'warnings': [{'type': \"NO_VARIABLE_FOUND\", 'message': \"No variable found with name 'x'\"}]}"));
}

@Test
@Test
void shouldReturnEvaluationFailure() throws Exception {
mvc.perform(
post("/api/v1/feel/evaluate")
Expand Down

0 comments on commit 36d4510

Please sign in to comment.