-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...leth/admin/ui/jsonschema/RelyingPartyOverridesJsonSchemaValidatingControllerAdvice.groovy
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,24 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.jsonschema | ||
|
||
import org.springframework.core.MethodParameter | ||
import org.springframework.http.converter.HttpMessageConverter | ||
import org.springframework.web.bind.annotation.ControllerAdvice | ||
import org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter | ||
|
||
import java.lang.reflect.Type | ||
|
||
/** | ||
* Controller advice implementation for validating relying party overrides payload coming from UI layer | ||
* against pre-defined JSON schema. | ||
* | ||
* @author Dmitriy Kopylenko | ||
*/ | ||
@ControllerAdvice | ||
class RelyingPartyOverridesJsonSchemaValidatingControllerAdvice extends RequestBodyAdviceAdapter { | ||
|
||
@Override | ||
boolean supports(MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) { | ||
def cls = targetType.typeName | ||
print('cx') | ||
} | ||
} |
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