-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@Valid annotations added on same getter in both parent and child objects lead to exception
- Loading branch information
Aleksandar Stojsavljevic
committed
Jul 17, 2018
1 parent
b6298bc
commit ef8cc28
Showing
5 changed files
with
373 additions
and
13 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
21 changes: 21 additions & 0 deletions
21
src/test/java/com/phoenixnap/oss/ramlplugin/raml2code/github/Issue265RulesTest.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,21 @@ | ||
package com.phoenixnap.oss.ramlplugin.raml2code.github; | ||
|
||
import org.junit.Test; | ||
|
||
import com.phoenixnap.oss.ramlplugin.raml2code.rules.GitHubAbstractRuleTestBase; | ||
import com.phoenixnap.oss.ramlplugin.raml2code.rules.Spring4ControllerDecoratorRule; | ||
|
||
/** | ||
* @author aleksandars | ||
* @since 2.0.3 | ||
*/ | ||
public class Issue265RulesTest extends GitHubAbstractRuleTestBase { | ||
|
||
@Test | ||
public void testDontGenerateForAnnotation() throws Exception { | ||
loadRaml("issue-265.raml"); | ||
rule = new Spring4ControllerDecoratorRule(); | ||
rule.apply(getControllerMetadata(), jCodeModel); | ||
verifyGeneratedCode("Issue265Spring4ControllerDecorator"); | ||
} | ||
} |
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 @@ | ||
#%RAML 1.0 | ||
|
||
title: Validation Bug Test | ||
|
||
types: | ||
Address: | ||
type: object | ||
properties: | ||
city: string | ||
street: string | ||
houseNo: string | ||
Parent: | ||
type: object | ||
properties: | ||
address: Address | ||
Child: | ||
type: Parent | ||
|
||
/parent: | ||
post: | ||
body: | ||
application/json: | ||
type: Child |
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.