public class RamlHelper extends Object
| Constructor and Description |
|---|
RamlHelper() |
| Modifier and Type | Method and Description |
|---|---|
static RamlResponse |
getSuccessfulResponse(RamlAction action)
Gets the successful response from an action (200 or 201)
|
static void |
mergeActions(RamlAction existingAction,
RamlAction newAction)
Merges together existing actions.
|
static void |
mergeResources(RamlResource existing,
RamlResource resource,
boolean addActions)
Tree merging algorithm, if a resource already exists it will not overwrite and add all children to the existing resource
|
static void |
mergeResources(RamlRoot raml,
RamlResource resource,
boolean addActions)
Merges two RAML Resources trees together.
|
static void |
removeResourceTree(RamlRoot model,
String urlPrefixToIgnore)
Removes a section of the tree from the resources in a Raml model and moves all sub resources to the root
|
public static void mergeResources(RamlResource existing, RamlResource resource, boolean addActions)
existing - The existing resource in the modelresource - The resource to merge inaddActions - If true it will copy all actions even if the resource itself isnt copiedpublic static void mergeResources(RamlRoot raml, RamlResource resource, boolean addActions)
raml - The RAML model to merge intoresource - The candidate resourceaddActions - whether we should add actionspublic static void mergeActions(RamlAction existingAction, RamlAction newAction)
existingAction - The action we already have in our modelnewAction - The action we we want to include in the modelpublic static RamlResponse getSuccessfulResponse(RamlAction action)
action - The action to parsepublic static void removeResourceTree(RamlRoot model, String urlPrefixToIgnore)
model - The Raml model to modifyurlPrefixToIgnore - The section of the URL to removeCopyright © 2017. All rights reserved.