Skip to content
New issue

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

Missing properties inside TypeScript SchemaType type #11139

Closed
arnaud-moncel opened this issue Dec 24, 2021 · 3 comments
Closed

Missing properties inside TypeScript SchemaType type #11139

arnaud-moncel opened this issue Dec 24, 2021 · 3 comments
Labels
enhancement This issue is a user-facing general improvement that doesn't fix a bug or add a new feature typescript Types or Types-test related issue / Pull Request
Milestone

Comments

@arnaud-moncel
Copy link

Hi guys 👋 a little question / type request.

Do you want to request a feature or report a bug?
Not really a bug, but i think some properties are missing inside SchemaType type (eg: path, validators, isRequired).

What is the current behavior?
Some properties are missing like path, validators, isRequired.

What is the expected behavior?
I don't know if these absences are voluntary, but i think these property are missing.
Let me know if i'm right 🙏

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js: 14.17.6
Mongoose: 6.1.3
MongoDB: 4.4.6

@IslandRhythms IslandRhythms added the help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary label Dec 27, 2021
@vkarpov15
Copy link
Collaborator

Those properties aren't part of the publicly documented API: https://mongoosejs.com/docs/api/schematype.html so they aren't in the TS definitions either.

Can you please explain why you need access to these properties? We can add them, just want to be consistent about it.

@arnaud-moncel
Copy link
Author

arnaud-moncel commented Dec 30, 2021

Hi @vkarpov15 👋 thank you for your answer 🙏
I perform some schema introspection to change some behaviours of my application.
For exemple, I d'ont know database schema but i craft some form based on it to create data.
So i want to put some input required when a field is required.

Let me know if it's not clear?

@vkarpov15 vkarpov15 added this to the 6.2.0 milestone Jan 5, 2022
@vkarpov15 vkarpov15 added enhancement This issue is a user-facing general improvement that doesn't fix a bug or add a new feature typescript Types or Types-test related issue / Pull Request and removed help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary labels Jan 5, 2022
@vkarpov15
Copy link
Collaborator

We'll add this for our next minor release.

vkarpov15 added a commit that referenced this issue Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue is a user-facing general improvement that doesn't fix a bug or add a new feature typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

No branches or pull requests

3 participants