Skip to content

Commit

Permalink
remove outdated comment (#50895) (#50913)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Nov 18, 2019
1 parent dd5f7db commit bf75969
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Each route can have only one handler function, which is executed when the route

```ts
const router = createRouter();
// handler is called when '${my-plugin-id}/path' resource is requested with `GET` method
// handler is called when '/path' resource is requested with `GET` method
router.get({ path: '/path', validate: false }, (context, req, res) => res.ok({ content: 'ok' }));

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface HttpServiceSetup

## Example

To handle an incoming request in your plugin you should: - Create a `Router` instance. Router is already configured to use `plugin-id` to prefix path segment for your routes.
To handle an incoming request in your plugin you should: - Create a `Router` instance.

```ts
const router = httpSetup.createRouter();
Expand Down Expand Up @@ -61,7 +61,7 @@ const handler = async (context: RequestHandlerContext, request: KibanaRequest, r
}

```
- Register route handler for GET request to 'my-app/path/<!-- -->{<!-- -->id<!-- -->}<!-- -->' path
- Register route handler for GET request to 'path/<!-- -->{<!-- -->id<!-- -->}<!-- -->' path

```ts
import { schema, TypeOf } from '@kbn/config-schema';
Expand Down
6 changes: 3 additions & 3 deletions src/core/server/http/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export type RequestHandlerContextProvider<
*
* @example
* To handle an incoming request in your plugin you should:
* - Create a `Router` instance. Router is already configured to use `plugin-id` to prefix path segment for your routes.
* - Create a `Router` instance.
* ```ts
* const router = httpSetup.createRouter();
* ```
Expand Down Expand Up @@ -87,7 +87,7 @@ export type RequestHandlerContextProvider<
* }
* ```
*
* - Register route handler for GET request to 'my-app/path/{id}' path
* - Register route handler for GET request to 'path/{id}' path
* ```ts
* import { schema, TypeOf } from '@kbn/config-schema';
* const router = httpSetup.createRouter();
Expand Down Expand Up @@ -184,7 +184,7 @@ export interface HttpServiceSetup {
* @example
* ```ts
* const router = createRouter();
* // handler is called when '${my-plugin-id}/path' resource is requested with `GET` method
* // handler is called when '/path' resource is requested with `GET` method
* router.get({ path: '/path', validate: false }, (context, req, res) => res.ok({ content: 'ok' }));
* ```
* @public
Expand Down

0 comments on commit bf75969

Please sign in to comment.