Skip to content

Commit

Permalink
expand configuration properties
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome committed Feb 12, 2025
1 parent 18e0f29 commit 6c83c6c
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 7 deletions.
44 changes: 44 additions & 0 deletions vscode/microsoft-kiota/src/kiotaInterop/lib/generateClient.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
/**
* Options for generating a client.
*
* @param {boolean} clearCache - Whether to clear the cache before generating the client.
* @param {boolean} cleanOutput - Whether to clean the output directory before generating the client.
* @param {string} clientClassName - The name of the client class to generate.
* @param {string} clientNamespaceName - The namespace name for the generated client.
* @param {string[]} deserializers - The list of deserializers to use.
* @param {string[]} disabledValidationRules - The list of validation rules to disable.
* @param {boolean} excludeBackwardCompatible - Whether to exclude backward-compatible changes.
* @param {string[]} excludePatterns - The list of patterns to exclude from generation.
* @param {boolean} includeAdditionalData - Whether to include additional data in the generated client.
* @param {string[]} includePatterns - The list of patterns to include in generation.
* @param {KiotaGenerationLanguage} language - The programming language for the generated client.
* @param {string} openAPIFilePath - The file path to the OpenAPI specification.
* @param {string} outputPath - The output path for the generated client.
* @param {string[]} serializers - The list of serializers to use.
* @param {string[]} structuredMimeTypes - The list of structured MIME types to support.
* @param {boolean} usesBackingStore - Whether the generated client uses a backing store.
* @param {ConsumerOperation} operation - The consumer operation to perform.
* @param {string} workingDirectory - The working directory for the generation process.
*
*/
import * as rpc from "vscode-jsonrpc/node";

import { checkForSuccess, ConsumerOperation, GenerationConfiguration, KiotaLogEntry } from "..";
Expand Down Expand Up @@ -30,6 +53,27 @@ interface ClientGenerationOptions {
* Generates a client based on the provided client generation options.
*
* @param {ClientGenerationOptions} clientGenerationOptions - The options for generating the client.
* * Options for generating a client.
*
* @param {boolean} clientGenerationOptions.clearCache - Whether to clear the cache before generating the client.
* @param {boolean} clientGenerationOptions.cleanOutput - Whether to clean the output directory before generating the client.
* @param {string} clientGenerationOptions.clientClassName - The name of the client class to generate.
* @param {string} clientGenerationOptions.clientNamespaceName - The namespace name for the generated client.
* @param {string[]} clientGenerationOptions.deserializers - The list of deserializers to use.
* @param {string[]} clientGenerationOptions.disabledValidationRules - The list of validation rules to disable.
* @param {boolean} clientGenerationOptions.excludeBackwardCompatible - Whether to exclude backward-compatible changes.
* @param {string[]} clientGenerationOptions.excludePatterns - The list of patterns to exclude from generation.
* @param {boolean} clientGenerationOptions.includeAdditionalData - Whether to include additional data in the generated client.
* @param {string[]} clientGenerationOptions.includePatterns - The list of patterns to include in generation.
* @param {KiotaGenerationLanguage} clientGenerationOptions.language - The programming language for the generated client.
* @param {string} clientGenerationOptions.openAPIFilePath - The file path to the OpenAPI specification.
* @param {string} clientGenerationOptions.outputPath - The output path for the generated client.
* @param {string[]} clientGenerationOptions.serializers - The list of serializers to use.
* @param {string[]} clientGenerationOptions.structuredMimeTypes - The list of structured MIME types to support.
* @param {boolean} clientGenerationOptions.usesBackingStore - Whether the generated client uses a backing store.
* @param {ConsumerOperation} clientGenerationOptions.operation - The consumer operation to perform.
* @param {string} clientGenerationOptions.workingDirectory - The working directory for the generation process.
* @returns {Promise<KiotaResult | undefined>} A promise that resolves to a KiotaResult if successful, or undefined if not.
* @throws {Error} If an error occurs during the client generation process.
*/
Expand Down
13 changes: 13 additions & 0 deletions vscode/microsoft-kiota/src/kiotaInterop/lib/generatePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ interface PluginGenerationOptions {
* Generates a plugin based on the provided options.
*
* @param {PluginGenerationOptions} pluginGenerationOptions - The options for generating the plugin.
* @param {string} pluginGenerationOptions.openAPIFilePath - The file path to the OpenAPI specification.
* @param {string} pluginGenerationOptions.outputPath - The output path where the generated plugin will be saved.
* @param {KiotaPluginType[]} pluginGenerationOptions.pluginTypes - The types of plugins to generate.
* @param {string[]} pluginGenerationOptions.includePatterns - The patterns to include in the generation process.
* @param {string[]} pluginGenerationOptions.excludePatterns - The patterns to exclude from the generation process.
* @param {string} pluginGenerationOptions.clientClassName - The name of the client class to generate.
* @param {boolean} pluginGenerationOptions.clearCache - Whether to clear the cache before generation.
* @param {boolean} pluginGenerationOptions.cleanOutput - Whether to clean the output directory before generation.
* @param {string[]} pluginGenerationOptions.disabledValidationRules - The validation rules to disable during generation.
* @param {ConsumerOperation} pluginGenerationOptions.operation - The operation to perform during generation.
* @param {PluginAuthType | null} [pluginGenerationOptions.pluginAuthType] - The authentication type for the plugin, if any.
* @param {string} [pluginGenerationOptions.pluginAuthRefid] - The reference ID for the plugin authentication, if any.
* @param {string} pluginGenerationOptions.workingDirectory - The working directory for the generation process.
* @returns {Promise<KiotaResult | undefined>} A promise that resolves to a KiotaResult if successful, or undefined if not.
* @throws {Error} If an error occurs during the generation process.
*
Expand Down
8 changes: 4 additions & 4 deletions vscode/microsoft-kiota/src/kiotaInterop/lib/removeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export async function removePlugin({ pluginName, cleanOutput, workingDirectory }
/**
* Removes a client using the provided configuration.
*
* @param {RemoveClientConfiguration} param0 - The configuration for removing the client.
* @param {string} param0.clientName - The name of the client to be removed.
* @param {boolean} param0.cleanOutput - A flag indicating whether to clean the output.
* @param {string} param0.workingDirectory - The working directory for the operation.
* @param {RemoveClientConfiguration} config - The configuration for removing the client.
* @param {string} config.clientName - The name of the client to be removed.
* @param {boolean} config.cleanOutput - A flag indicating whether to clean the output.
* @param {string} config.workingDirectory - The working directory for the operation.
* @returns {Promise<KiotaResult | undefined>} A promise that resolves to a KiotaResult if the client was removed successfully, or undefined if no result is returned.
* @throws {Error} Throws an error if the result is an instance of Error.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ interface SearchConfiguration {
/**
* Searches for a description based on the provided search term and cache settings.
*
* @param {SearchConfiguration} param0 - The search configuration object.
* @param {string} param0.searchTerm - The term to search for.
* @param {boolean} param0.clearCache - Whether to clear the cache before searching.
* @param {SearchConfiguration} config - The search configuration object.
* @param {string} config.searchTerm - The term to search for.
* @param {boolean} config.clearCache - Whether to clear the cache before searching.
* @returns {Promise<Record<string, KiotaSearchResultItem> | undefined>} A promise that resolves to a record of search results or undefined if no results are found.
* @throws {Error} Throws an error if the search operation fails.
*/
Expand Down

0 comments on commit 6c83c6c

Please sign in to comment.