Skip to content

Commit

Permalink
chore(models): remove the api version from the model names (#2914)
Browse files Browse the repository at this point in the history
* chore(models): remove the api version from the model names

* chore: remove patch for redshift in copy-model
  • Loading branch information
AllanZhengYP authored Oct 19, 2021
1 parent 1a80bfd commit cdccc0d
Show file tree
Hide file tree
Showing 284 changed files with 2 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 2 additions & 8 deletions scripts/copy-models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,13 @@ const { models } = yargs
await fsPromises.stat(smithyModelsFile);
// File exists, copy it.
try {
const fileContent = (await fsPromises.readFile(smithyModelsFile))
.toString()
// Fix for issue SMITHY-95
.replace('"smithy.api#authDefinition": {},', "");
const fileContent = (await fsPromises.readFile(smithyModelsFile)).toString();

const sdkIdRE = /"sdkId": "([^"]*)"/;
const sdkId = fileContent.match(sdkIdRE)[1].toLowerCase().replace(/\s/g, "-");

const versionRE = /"version": "([^"]*)"/;
const version = fileContent.match(versionRE)[1];

// Copy file.
const outputFile = join(OUTPUT_DIR, `${sdkId}.${version}.json`);
const outputFile = join(OUTPUT_DIR, `${sdkId}.json`);
await fsPromises.writeFile(outputFile, fileContent);
} catch (e) {
// Copy failed, log.
Expand Down

0 comments on commit cdccc0d

Please sign in to comment.