We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there,
Just found a bug. For instance if having a schema like this :
{ address: { type: { type: String }, postalCode: String } }
Your lib outputs :
{ address: { type: String } }
All properties are lost.
I fixed it by modifying 2 places :
mongoose-to-swagger/lib/index.ts
Line 56 in 82808a4
if (type.type != null) {
if (type.type != null && !type.type?.type) {
Line 142 in 82808a4
const subSchema = value.type ? value.type : value;
const subSchema = value.type && !value.type?.type ? value.type : value;
I can open a PR if you want.
Cheers
The text was updated successfully, but these errors were encountered:
Hi @Cheyenne55! Would absolutely accept a PR to fix this as well as adding a regression test. Thanks!
Sorry, something went wrong.
No branches or pull requests
Hi there,
Just found a bug. For instance if having a schema like this :
Your lib outputs :
All properties are lost.
I fixed it by modifying 2 places :
mongoose-to-swagger/lib/index.ts
Line 56 in 82808a4
mongoose-to-swagger/lib/index.ts
Line 142 in 82808a4
I can open a PR if you want.
Cheers
The text was updated successfully, but these errors were encountered: