Skip to content

Commit

Permalink
[Console] Remove an unused functions for "extension" files
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech committed Jul 13, 2023
1 parent 3c46440 commit b8d8f92
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
4 changes: 0 additions & 4 deletions src/plugins/console/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ export class ConsoleServerPlugin implements Plugin<ConsoleSetup, ConsoleStart> {
},
kibanaVersion,
});

return {
...this.specDefinitionsService.setup(),
};
}

start() {
Expand Down
14 changes: 0 additions & 14 deletions src/plugins/console/server/services/spec_definitions_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class SpecDefinitionsService {

private readonly globalRules: Record<string, any> = {};
private readonly endpoints: Record<string, any> = {};
private readonly extensionSpecFilePaths: string[] = [];

private hasLoadedSpec = false;

Expand Down Expand Up @@ -82,16 +81,6 @@ export class SpecDefinitionsService {
};
}

public addExtensionSpecFilePath(path: string) {
this.extensionSpecFilePaths.push(path);
}

public setup() {
return {
addExtensionSpecFilePath: this.addExtensionSpecFilePath.bind(this),
};
}

public start() {
if (!this.hasLoadedSpec) {
this.loadJsonSpec();
Expand Down Expand Up @@ -129,9 +118,6 @@ export class SpecDefinitionsService {

private loadJsonSpec() {
const result = this.loadJSONSpecInDir(AUTOCOMPLETE_DEFINITIONS_FOLDER);
this.extensionSpecFilePaths.forEach((extensionSpecFilePath) => {
merge(result, this.loadJSONSpecInDir(extensionSpecFilePath));
});

Object.keys(result).forEach((endpoint) => {
this.addEndpointDescription(endpoint, result[endpoint]);
Expand Down

0 comments on commit b8d8f92

Please sign in to comment.