/** * Returns the list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined * by the given {@link org.raml.model.Resource}. * * @param resource * The given resource. * @return The list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as * defined by the given {@link org.raml.model.Resource}. */ private static List<PathVariable> getPathVariables( org.raml.model.Resource resource) { List<PathVariable> pathVariables = new ArrayList<>(); for (Entry<String, UriParameter> entry : resource.getUriParameters() .entrySet()) { pathVariables .add(getPathVariable(entry.getKey(), entry.getValue())); } if (resource.getParentResource() != null) { pathVariables .addAll(getPathVariables(resource.getParentResource())); } return pathVariables; }
rwadResource.setPathVariables(getPathVariables(resource)); rwadResource.getPathVariables().addAll(rootPathVariables); rwadResources.addAll(getResource( ConversionUtils.processResourceName(entry.getValue().getUri()), entry.getValue(), rootPathVariables));
for (Entry<String, UriParameter> entry : raml.getBaseUriParameters() .entrySet()) { rootPathVariables.add(getPathVariable(entry.getKey(), entry.getValue())); org.raml.model.Resource resource = entry.getValue(); contract.getResources().addAll( getResource( ConversionUtils.processResourceName(resource.getUri()), resource, rootPathVariables));
Map<String, Map<String, Object>> representationSamples = getSamples(contract); raml.setSecuritySchemes(getSecuritySchemes(endpoint)); fillResources(raml.getResources(), m, contract, representationSamples);
fillInputRepresentation(m, representationSamples, action, operation, ramlInRepresentation); try { ramlOutRepresentationWithMediaType .setExample(getExampleFromPayLoad( response.getOutputPayLoad(), representationSamples,
try { ramlInRepresentationWithMediaType .setExample(getExampleFromPayLoad( operation.getInputPayLoad(), representationSamples, mediaType));
Map<String, Map<String, Object>> representationSamples = getSamples(contract); raml.setSecuritySchemes(getSecuritySchemes(endpoint)); fillResources(raml.getResources(), m, contract, representationSamples);
for (Entry<String, UriParameter> entry : raml.getBaseUriParameters() .entrySet()) { rootPathVariables.add(getPathVariable(entry.getKey(), entry.getValue())); org.raml.model.Resource resource = entry.getValue(); contract.getResources().addAll( getResource( ConversionUtils.processResourceName(resource.getUri()), resource, rootPathVariables));
fillInputRepresentation(m, representationSamples, action, operation, ramlInRepresentation); try { ramlOutRepresentationWithMediaType .setExample(getExampleFromPayLoad( response.getOutputPayLoad(), representationSamples,
try { ramlInRepresentationWithMediaType .setExample(getExampleFromPayLoad( operation.getInputPayLoad(), representationSamples, mediaType));
Map<String, Map<String, Object>> representationSamples = getSamples(contract); raml.setSecuritySchemes(getSecuritySchemes(endpoint)); fillResources(raml.getResources(), m, contract, representationSamples);
/** * Returns the list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined * by the given {@link org.raml.model.Resource}. * * @param resource * The given resource. * @return The list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as * defined by the given {@link org.raml.model.Resource}. */ private static List<PathVariable> getPathVariables( org.raml.model.Resource resource) { List<PathVariable> pathVariables = new ArrayList<>(); for (Entry<String, UriParameter> entry : resource.getUriParameters() .entrySet()) { pathVariables .add(getPathVariable(entry.getKey(), entry.getValue())); } if (resource.getParentResource() != null) { pathVariables .addAll(getPathVariables(resource.getParentResource())); } return pathVariables; }
rwadResource.setPathVariables(getPathVariables(resource)); rwadResource.getPathVariables().addAll(rootPathVariables); rwadResources.addAll(getResource( ConversionUtils.processResourceName(entry.getValue().getUri()), entry.getValue(), rootPathVariables));
for (Entry<String, UriParameter> entry : raml.getBaseUriParameters() .entrySet()) { rootPathVariables.add(getPathVariable(entry.getKey(), entry.getValue())); org.raml.model.Resource resource = entry.getValue(); contract.getResources().addAll( getResource( ConversionUtils.processResourceName(resource.getUri()), resource, rootPathVariables));
fillInputRepresentation(m, representationSamples, action, operation, ramlInRepresentation); try { ramlOutRepresentationWithMediaType .setExample(getExampleFromPayLoad( response.getOutputPayLoad(), representationSamples,
try { ramlInRepresentationWithMediaType .setExample(getExampleFromPayLoad( operation.getInputPayLoad(), representationSamples, mediaType));
Map<String, Map<String, Object>> representationSamples = getSamples(contract); raml.setSecuritySchemes(getSecuritySchemes(endpoint)); fillResources(raml.getResources(), m, contract, representationSamples);
/** * Returns the list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined * by the given {@link org.raml.model.Resource}. * * @param resource * The given resource. * @return The list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as * defined by the given {@link org.raml.model.Resource}. */ private static List<PathVariable> getPathVariables( org.raml.model.Resource resource) { List<PathVariable> pathVariables = new ArrayList<>(); for (Entry<String, UriParameter> entry : resource.getUriParameters() .entrySet()) { pathVariables .add(getPathVariable(entry.getKey(), entry.getValue())); } if (resource.getParentResource() != null) { pathVariables .addAll(getPathVariables(resource.getParentResource())); } return pathVariables; }
rwadResource.setPathVariables(getPathVariables(resource)); rwadResource.getPathVariables().addAll(rootPathVariables); rwadResources.addAll(getResource( ConversionUtils.processResourceName(entry.getValue().getUri()), entry.getValue(), rootPathVariables));
for (Entry<String, UriParameter> entry : raml.getBaseUriParameters() .entrySet()) { rootPathVariables.add(getPathVariable(entry.getKey(), entry.getValue())); org.raml.model.Resource resource = entry.getValue(); contract.getResources().addAll( getResource( ConversionUtils.processResourceName(resource.getUri()), resource, rootPathVariables));