Skip to content

Commit

Permalink
Do not migrate complete-api file to newer draft7. Only json-schema fi…
Browse files Browse the repository at this point in the history
…les.
  • Loading branch information
Mattiamato committed May 23, 2022
1 parent 03dab98 commit 6cae64e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apikana",
"version": "0.9.27",
"version": "0.9.28",
"description": "Integrated tools for REST API design - アピ",
"main": "index.js",
"bin": {
Expand Down
6 changes: 2 additions & 4 deletions src/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,20 +544,18 @@ module.exports = {
}
});

// Migrate the complete api to json schema draft version 7
var latestSchema = migrate.migrateSchemaToLatestVersion(cleanCompleteApi);

var out = path.resolve(dest, 'model/openapi');
fse.mkdirsSync(out);
fs.writeFileSync(path.resolve(out, 'api.json'), JSON.stringify(cleanRestApi, null, 2));
fs.writeFileSync(path.resolve(out, 'api.yaml'), yaml.stringify(cleanRestApi, 6, 2));
fs.writeFileSync(path.resolve(out, 'complete-api.json'), JSON.stringify(latestSchema, null, 2));
fs.writeFileSync(path.resolve(out, 'complete-api.json'), JSON.stringify(cleanCompleteApi, null, 2));
fs.writeFileSync(path.resolve(out, 'complete-api.yaml'), yaml.stringify(cleanCompleteApi, 6, 2));
});
});

function writeFullSchemaFiles(destination, fileName, schema){

// Migrate the complete api to json schema draft version 7
var latestSchema = migrate.migrateSchemaToLatestVersion(schema);

var jsonSchemaOutputDirV4 = path.resolve(destination, 'model/json-schema-v4-full')
Expand Down

0 comments on commit 6cae64e

Please sign in to comment.