Skip to content

Commit eb94733

Browse files
authored
Add feature flag support (elastic#1571)
1 parent 7804c09 commit eb94733

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

compiler/src/model/build-model.ts

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ export function compileEndpoints (): Record<string, model.Endpoint> {
8383
}
8484
})
8585
}
86+
if (typeof spec.feature_flag === 'string') {
87+
map[api].featureFlag = spec.feature_flag
88+
}
8689
}
8790
return map
8891
}

compiler/src/model/json-spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export interface JsonSpec {
3232
}
3333
stability: model.Stability
3434
visibility: model.Visibility
35+
feature_flag?: string
3536
headers: {
3637
accept?: string[]
3738
content_type?: string[]

compiler/src/model/metamodel.ts

+1
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ export class Endpoint {
393393
since?: string
394394
stability?: Stability
395395
visibility?: Visibility
396+
featureFlag?: string
396397
accept?: string[]
397398
contentType?: string[]
398399
privileges?: {

output/schema/schema.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)