@RestController @RequestMapping(value="/completions") @ExposesResourceFor(value=CompletionProposalsResource.class) public class CompletionController extends Object
StreamCompletionProvider as a REST API.| Constructor and Description |
|---|
CompletionController(StreamCompletionProvider completionProvider)
Create a controller for the provided
StreamCompletionProvider. |
| Modifier and Type | Method and Description |
|---|---|
CompletionProposalsResource |
completions(String start,
int detailLevel)
Return a list of possible completions given a prefix string that the user has started typing.
|
public CompletionController(StreamCompletionProvider completionProvider)
StreamCompletionProvider.@RequestMapping(value="/stream") public CompletionProposalsResource completions(@RequestParam(value="start") String start, @RequestParam(value="detailLevel",defaultValue="1") int detailLevel)
start - the amount of text written so fardetailLevel - the level of detail the user wants in completions, starting at 1.
Higher values request more detail, with values typically in the range [1..5]Copyright © 2016 Pivotal Software, Inc.. All rights reserved.