remove outdated comment (#50895) (#50913)

This commit is contained in:
Mikhail Shustov 2019-11-18 17:17:48 +01:00 committed by GitHub
parent dd5f7db7f4
commit bf75969ab0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -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' }));
```

View file

@ -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();
@ -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';

View file

@ -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();
* ```
@ -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();
@ -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