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
I'm trying to add a Point type to my schema which follows this format
point: { type: "Point", coordinates: [ 40, 5 ] }
I figured the following approach would work
point: Type.object().of({ type: Type.string({ enum: ["Point"], required: true, default: "Point" }), coordinates: Type.array().of(Type.number()), })
But it appears having an entry with key 'type' conflicts with ts-mongoose because it results in the following
point: { type: { type: "Point", coordinates: [ ] } }
Is this a bug or is there another way to add GeoJSON types?
The text was updated successfully, but these errors were encountered:
See mongoose documentation https://mongoosejs.com/docs/guide.html#typeKey
Sorry, something went wrong.
No branches or pull requests
I'm trying to add a Point type to my schema which follows this format
I figured the following approach would work
But it appears having an entry with key 'type' conflicts with ts-mongoose because it results in the following
Is this a bug or is there another way to add GeoJSON types?
The text was updated successfully, but these errors were encountered: