public class MediaTypeResolver extends Object
| Constructor and Description |
|---|
MediaTypeResolver() |
| Modifier and Type | Method and Description |
|---|---|
List<ValidationResult> |
beforeDocumentStart(org.yaml.snakeyaml.nodes.MappingNode rootNode)
checks if there is a default media type declared
|
List<ValidationResult> |
resolve(org.yaml.snakeyaml.nodes.MappingNode bodyNode)
inject the default media type if an explicit media type is not
declared and the body contains media type child elements
(e.g.: schema)
|
void |
setBodyDefaultMediaType(Map<String,Resource> resourceMap)
if no explicit media type is defined in either the request or
response body, the default one is applied
|
public List<ValidationResult> beforeDocumentStart(org.yaml.snakeyaml.nodes.MappingNode rootNode)
rootNode - raml root nodepublic List<ValidationResult> resolve(org.yaml.snakeyaml.nodes.MappingNode bodyNode)
bodyNode - mapping node with media types or media type child elementsCopyright © 2020. All rights reserved.