forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OAS] Include alerting rule APIs (elastic#189962)
## Summary Includes alerting rule APIs in our OAS snapshots. ## How to test Using bump CLI you can preview the output: ```sh bump preview ./oas_docs/bundle.json # or bump preview ./oas_docs/bundle.serverless.json ``` --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
Showing
11 changed files
with
9,535 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
18 changes: 9 additions & 9 deletions
18
packages/kbn-router-to-openapispec/src/__snapshots__/generate_oas.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/kbn-router-to-openapispec/src/operation_id_counter.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { createOperationIdCounter } from './operation_id_counter'; | ||
|
||
test('empty case', () => { | ||
const opIdCounter = createOperationIdCounter(); | ||
expect(opIdCounter('')).toBe('#0'); | ||
}); | ||
|
||
test('other cases', () => { | ||
const opIdCounter = createOperationIdCounter(); | ||
const tests = [ | ||
['/', '%2F#0'], | ||
['/api/cool', '%2Fapi%2Fcool#0'], | ||
['/api/cool', '%2Fapi%2Fcool#1'], | ||
['/api/cool', '%2Fapi%2Fcool#2'], | ||
['/api/cool/{variable}', '%2Fapi%2Fcool%2F%7Bvariable%7D#0'], | ||
['/api/cool/{optionalVariable?}', '%2Fapi%2Fcool%2F%7BoptionalVariable%3F%7D#0'], | ||
['/api/cool/{optionalVariable?}', '%2Fapi%2Fcool%2F%7BoptionalVariable%3F%7D#1'], | ||
]; | ||
|
||
tests.forEach(([input, expected]) => { | ||
expect(opIdCounter(input)).toBe(expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters