Conversion library for transforming Mongoose schema objects into Swagger schema definitions.
MIT License
Bot releases are visible (Hide)
Fixed bug w/ mixed handling.
Published by blugavere almost 5 years ago
Published by blugavere almost 5 years ago
This is technically a breaking change from 0.x versions since previously:
new Schema({
foo: { bar: String },
})
would result in a swagger output of "foo.bar": { type: "string" } which is valid swagger, but technically incorrect. Now it will result in { foo: { properties: { bar: { type: "string" } } } }
which is both valid swagger and has the desired output.
Added arbitrary meta field support - common ask was to add arbitrary props like "description" to mongoose schemas and have information propagate out through swagger schema.
Added better support for "required" fields.