That's my point, it should not be considered a sub resource of container.
Or at least not only. Because there may be more ways to query for modules.

So it would rather by /runtime/modules?containerId=x

And we could later want to add &type=foo


On Wed, Oct 9, 2013 at 6:49 PM, Ilayaperumal Gopinathan <
notifications@github.com> wrote:

> In
> spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/RuntimeModulesController.java:
>
> > +		return result;
> > +	}
> > +
> > +	/*
> > +	 * Work around https://github.com/SpringSource/spring-hateoas/issues/89
> > +	 */
> > +	private PagedResources<ModuleResource> safePagedResources(PagedResourcesAssembler<ModuleEntity> assembler,
> > +			Page<ModuleEntity> page) {
> > +		if (page.hasContent()) {
> > +			return assembler.toResource(page, resourceAssemblerSupport);
> > +		}
> > +		else {
> > +			return new PagedResources<ModuleResource>(new ArrayList<ModuleResource>(), null);
> > +		}
> > +	}
> > +
>
> The reason I moved the runtime modules by container into
> ContainersController was that to have the REST endpoint
> 'runtime/containers/{containerId}/modules'. If I move that to here in
> ModulesRepository then, not sure a REST endpoint URI
> '{containerId}/modules' would make sense under 'runtime/modules'
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/spring-projects/spring-xd/pull/340/files#r6861750>
> .
>