public class RamlParser extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
injectHttpHeadersParameter
If set to true, we will add a HttpHeaders parameter in the action methods
|
protected static org.slf4j.Logger |
logger
Class Logger
|
protected boolean |
seperateMethodsByContentType
If set to true, we will generate seperate methods for different content types in the RAML
|
| Constructor and Description |
|---|
RamlParser(String basePackage) |
RamlParser(String basePackage,
String startUrl) |
RamlParser(String basePackage,
String startUrl,
boolean seperateMethodsByContentType,
boolean injectHttpHeadersParameter) |
| Modifier and Type | Method and Description |
|---|---|
Set<ApiResourceMetadata> |
checkResource(String baseUrl,
RamlResource resource,
ApiResourceMetadata controller,
RamlRoot document)
Recursive method to parse resources in a Raml File.
|
Set<ApiResourceMetadata> |
extractControllers(RamlRoot raml)
This method will extract a set of controllers from the RAML file.
|
static RamlRoot |
loadRamlFromFile(String ramlFileUrl)
Loads a RAML document from a file.
|
protected static final org.slf4j.Logger logger
protected boolean seperateMethodsByContentType
protected boolean injectHttpHeadersParameter
public RamlParser(String basePackage)
public Set<ApiResourceMetadata> extractControllers(RamlRoot raml)
raml - The raml document to be parsedpublic Set<ApiResourceMetadata> checkResource(String baseUrl, RamlResource resource, ApiResourceMetadata controller, RamlRoot document)
baseUrl - The url currently being checked. Used to keep depthresource - The Resource in the RAML file being parsedcontroller - The root controller if created for this branchdocument - The raml Document being parsepublic static RamlRoot loadRamlFromFile(String ramlFileUrl)
ramlFileUrl - The path to the file, this can either be a resource on the class path (in which case the classpath: prefix should be omitted) or a file on disk (in which case the file: prefix should be included)Copyright © 2017. All rights reserved.