Skip to content

Commit d3ee5eb

Browse files
committed
Fix lint
1 parent 0f364c1 commit d3ee5eb

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

compiler/src/steps/validate-model.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -210,41 +210,41 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma
210210
/**
211211
* Validates that all type names in the model are unique
212212
*/
213-
function validateUniqueTypeNames(apiModel: model.Model, modelError: (msg: string) => void): void {
213+
function validateUniqueTypeNames (apiModel: model.Model, modelError: (msg: string) => void): void {
214214
const existingDuplicates: Record<string, string[]> = {
215-
"Action": ["indices.modify_data_stream", "indices.update_aliases", "watcher._types"],
216-
"Actions": ["ilm._types", "security.put_privileges", "watcher._types"],
217-
"ComponentTemplate": ["cat.component_templates", "cluster._types"],
218-
"Context": ["_global.get_script_context", "_global.search._types", "nodes._types"],
219-
"DatabaseConfigurationMetadata": ["ingest.get_geoip_database", "ingest.get_ip_location_database"],
220-
"Datafeed": ["ml._types", "xpack.usage"],
221-
"Destination": ["_global.reindex", "transform._types"],
222-
"Feature": ["features._types", "indices.get", "xpack.info"],
223-
"Features": ["indices.get", "xpack.info"],
224-
"Filter": ["_global.termvectors", "ml._types"],
225-
"IndexingPressure": ["cluster.stats", "indices._types", "nodes._types"],
226-
"IndexingPressureMemory": ["cluster.stats", "indices._types", "nodes._types"],
227-
"Ingest": ["ingest._types", "nodes._types"],
228-
"MigrationFeature": ["migration.get_feature_upgrade_status", "migration.post_feature_upgrade"],
229-
"Operation": ["_global.mget", "_global.mtermvectors"],
230-
"Phase": ["ilm._types", "xpack.usage"],
231-
"Phases": ["ilm._types", "xpack.usage"],
232-
"Pipeline": ["ingest._types", "logstash._types"],
233-
"Policy": ["enrich._types", "ilm._types", "slm._types"],
234-
"RequestItem": ["_global.msearch", "_global.msearch_template"],
235-
"ResponseItem": ["_global.bulk", "_global.mget", "_global.msearch"],
236-
"RoleMapping": ["security._types", "xpack.usage"],
237-
"RuntimeFieldTypes": ["cluster.stats", "xpack.usage"],
238-
"ShardsStats": ["indices.field_usage_stats", "snapshot._types"],
239-
"ShardStats": ["ccr._types", "indices.stats"],
240-
"Source": ["_global.reindex", "transform._types"],
241-
"Token": ["_global.termvectors", "security.authenticate", "security.create_service_token", "security.enroll_kibana"],
215+
Action: ['indices.modify_data_stream', 'indices.update_aliases', 'watcher._types'],
216+
Actions: ['ilm._types', 'security.put_privileges', 'watcher._types'],
217+
ComponentTemplate: ['cat.component_templates', 'cluster._types'],
218+
Context: ['_global.get_script_context', '_global.search._types', 'nodes._types'],
219+
DatabaseConfigurationMetadata: ['ingest.get_geoip_database', 'ingest.get_ip_location_database'],
220+
Datafeed: ['ml._types', 'xpack.usage'],
221+
Destination: ['_global.reindex', 'transform._types'],
222+
Feature: ['features._types', 'indices.get', 'xpack.info'],
223+
Features: ['indices.get', 'xpack.info'],
224+
Filter: ['_global.termvectors', 'ml._types'],
225+
IndexingPressure: ['cluster.stats', 'indices._types', 'nodes._types'],
226+
IndexingPressureMemory: ['cluster.stats', 'indices._types', 'nodes._types'],
227+
Ingest: ['ingest._types', 'nodes._types'],
228+
MigrationFeature: ['migration.get_feature_upgrade_status', 'migration.post_feature_upgrade'],
229+
Operation: ['_global.mget', '_global.mtermvectors'],
230+
Phase: ['ilm._types', 'xpack.usage'],
231+
Phases: ['ilm._types', 'xpack.usage'],
232+
Pipeline: ['ingest._types', 'logstash._types'],
233+
Policy: ['enrich._types', 'ilm._types', 'slm._types'],
234+
RequestItem: ['_global.msearch', '_global.msearch_template'],
235+
ResponseItem: ['_global.bulk', '_global.mget', '_global.msearch'],
236+
RoleMapping: ['security._types', 'xpack.usage'],
237+
RuntimeFieldTypes: ['cluster.stats', 'xpack.usage'],
238+
ShardsStats: ['indices.field_usage_stats', 'snapshot._types'],
239+
ShardStats: ['ccr._types', 'indices.stats'],
240+
Source: ['_global.reindex', 'transform._types'],
241+
Token: ['_global.termvectors', 'security.authenticate', 'security.create_service_token', 'security.enroll_kibana']
242242
}
243243

244244
// collect namespaces for each type name
245245
const typeNames = new Map<string, string[]>()
246246
for (const type of apiModel.types) {
247-
let name = type.name.name
247+
const name = type.name.name
248248
if (name !== 'Request' && name !== 'Response' && name !== 'ResponseBase') {
249249
const namespaces = typeNames.get(name) ?? []
250250
namespaces.push(type.name.namespace)

output/schema/schema-serverless.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)