diff --git a/package.json b/package.json index 96d50ca..da95f70 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/generate.js b/src/generate.js index 24b6189..76ea898 100644 --- a/src/generate.js +++ b/src/generate.js @@ -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')