mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Update generating_oas_for_http_apis.mdx (#191037)
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
This commit is contained in:
parent
9ab690e23b
commit
753f3d9dd2
1 changed files with 13 additions and 3 deletions
|
@ -90,9 +90,17 @@ import { fooResource } from '../../schemas/v1';
|
|||
// Note: this response schema is instantiated lazily to avoid creating schemas that are not needed in most cases!
|
||||
const fooResourceResponse = () => {
|
||||
return schema.object({
|
||||
id: schema.string({ maxLength: 20 }),
|
||||
name: schema.string(),
|
||||
createdAt: schema.string(),
|
||||
id: schema.string({
|
||||
maxLength: 20,
|
||||
meta: { description: 'Add a description.' }
|
||||
}),
|
||||
name: schema.string({ meta: { description: 'Add a description.' } }),
|
||||
createdAt: schema.string({
|
||||
meta: {
|
||||
description: 'Add a description.',
|
||||
deprecated: true, // An indicator that the property is deprecated
|
||||
},
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -106,6 +114,8 @@ function registerFooRoute(router: IRouter, docLinks: DoclinksStart) {
|
|||
access: 'public',
|
||||
summary: 'Create a foo resource'
|
||||
description: `A foo resource enables baz. See the following [documentation](${docLinks.links.fooResource}).`,
|
||||
tags: ['oas-tag:my tag'], // Each operation must have a tag that's used to group similar endpoints in the docs
|
||||
deprecated: true // An indicator that the operation is deprecated
|
||||
})
|
||||
.addVersion({
|
||||
version: '2023-10-31',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue