diff --git a/config.yaml b/config.yaml deleted file mode 100644 index 12aaeb1a..00000000 --- a/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ -additionalProperties: - paramNaming: original \ No newline at end of file diff --git a/src/download/exchangeTypes.ts b/src/download/exchangeTypes.ts index d87b17b6..23d30245 100644 --- a/src/download/exchangeTypes.ts +++ b/src/download/exchangeTypes.ts @@ -45,3 +45,22 @@ export type RawRestApi = Omit & { version: string; }[]; }; + +export type ExchangeConfig = { + dependencies?: { + version: string; + assetId: string; + groupId: string; + }[]; + version: string; + originalFormatVersion: string; + apiVersion: string; + descriptorVersion: string; + classifier: string; + main: string; + assetId: string; + groupId: string; + organizationId: string; + name: string; + tags: string[]; +}; diff --git a/src/download/index.ts b/src/download/index.ts index fb31909b..156d8a91 100644 --- a/src/download/index.ts +++ b/src/download/index.ts @@ -9,4 +9,4 @@ export { extractFiles } from "./exchangeDirectoryParser"; export { groupByCategory, removeRamlLinks } from "./exchangeTools"; export { DownloadCommand } from "./downloadCommand"; export { getBearer } from "./bearerToken"; -export { RestApi } from "./exchangeTypes"; +export { RestApi, ExchangeConfig } from "./exchangeTypes"; diff --git a/src/generate/apiModel.ts b/src/generate/apiModel.ts index 17abc9cd..75940493 100644 --- a/src/generate/apiModel.ts +++ b/src/generate/apiModel.ts @@ -13,7 +13,7 @@ import { } from "../common/amfParser"; import { Name } from "../common/structures/name"; -import { RestApi } from "../download/exchangeTypes"; +import { ExchangeConfig, RestApi } from "../download/exchangeTypes"; import path from "path"; import fs from "fs-extra"; import { ramlToolLogger } from "../common/logger"; @@ -56,7 +56,7 @@ export class ApiModel extends ApiMetadata { fs.lstatSync(filepath).isDirectory() && fs.existsSync(path.join(filepath, "exchange.json")) ) { - const exchangeConfig = fs.readJSONSync( + const exchangeConfig: ExchangeConfig = fs.readJSONSync( path.join(filepath, "exchange.json") );