mongoose-to-swagger
mongoose-to-swagger copied to clipboard
Using "require" property instead of "required"
Hi there,
By default, description, enum, and required fields are extracted from the mongoose schema definitions and placed into the correspoding swagger properties definitions.
The problem I encountered is that "require" is used instead of "required" in the models' property of the project I am working on. And the result I get when I use props: ["require"]
is;
{
title: 'User',
properties: {
active: { type: 'boolean', require: false },
firstName: { type: 'string', require: false },
lastName: { type: 'string', require: false },
...
The result I am trying to get is;
{
title: 'User',
require: [ 'username', 'email', 'password', 'language' ],
properties:
...
Is there a way to get this result?
Thank you.