Skip to content

feat(export): Add MongoDB BSON Schema exporter#173

Closed
jdacoello wants to merge 2 commits intomainfrom
feat/mongodb-exporter
Closed

feat(export): Add MongoDB BSON Schema exporter#173
jdacoello wants to merge 2 commits intomainfrom
feat/mongodb-exporter

Conversation

@jdacoello
Copy link
Copy Markdown
Collaborator

  • Introduced a new GraphQL schema for testing MongoDB BSON export with various scalar types, enums, and nested types.
  • Added GeoJSON scalar type and related directives to support GeoJSON geometry in MongoDB.
  • Implemented end-to-end tests for the MongoDB exporter, ensuring correct BSON schema generation and validation.
  • Created unit tests for BSON type mapping, nullable handling, enum inlining, nested type inlining, list fields, directive support, and exclusion of certain types from the output.
  • Ensured that GeoJSON fields are correctly represented in the BSON schema with appropriate validation for required fields and types.

@jdacoello jdacoello force-pushed the feat/mongodb-exporter branch from ed18115 to 4e5310f Compare March 10, 2026 08:03
- Added support for GeoJSON geometry in MongoDB.
- Introduced datatype mappings from scalars to BSON.

Signed-off-by: JD Alvarez <8550265+jdacoello@users.noreply.github.com>
@jdacoello jdacoello force-pushed the feat/mongodb-exporter branch from 4e5310f to a54ad14 Compare March 10, 2026 08:11
…figuration

- Updated the MongoDB exporter to support a new `--properties-config` option that allows users to specify which object keys should have `additionalProperties: false`.
- Introduced a `load_properties_config` function to parse the YAML configuration file.
- Modified the `transform` method in `MongoDBTransformer` to accept a set of keys for which `additionalProperties` should be set to false.
- Updated the CLI commands to reflect changes in output file generation, including support for a `--validator` flag to wrap schemas in a MongoDB validator envelope.
- Enhanced tests to cover new functionality, including validation of properties configuration and error handling for unknown types and fields.
- Updated documentation to reflect changes in usage and functionality.

Signed-off-by: JD Alvarez <8550265+jdacoello@users.noreply.github.com>
@jdacoello jdacoello marked this pull request as ready for review March 16, 2026 21:59
@jdacoello
Copy link
Copy Markdown
Collaborator Author

Combined into #177

@jdacoello jdacoello closed this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant