Skip to content

Commit

Permalink
fix: try-me.js to include new associations
Browse files Browse the repository at this point in the history
  • Loading branch information
bravo-kernel committed Nov 6, 2019
1 parent a6fc6f5 commit 034a432
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions try-me.js
Expand Up @@ -60,9 +60,14 @@ console.log('OpenAPI v3:');
// OpenApi requires more than just the model schema for validation so we insert it into the wrapper
const wrapper = require('./test/strategies/openapi-v3-validation-wrapper');

wrapper.components.schemas.users = userSchema;
wrapper.components.schemas.profiles = schemaManager.generate(models.profile, openapi3strategy);
wrapper.components.schemas.documents = schemaManager.generate(models.document, openapi3strategy);
wrapper.components.schemas.user = userSchema;
wrapper.components.schemas.profile = schemaManager.generate(models.profile, openapi3strategy);
wrapper.components.schemas.document = schemaManager.generate(models.document, openapi3strategy);
wrapper.components.schemas.company = schemaManager.generate(models.company, openapi3strategy);
wrapper.components.schemas.friendship = schemaManager.generate(
models.friendship,
openapi3strategy,
);

console.log('Validation schema as JSON string:');
console.log(JSON.stringify(wrapper, null, 2));
Expand Down

0 comments on commit 034a432

Please sign in to comment.