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

Protobuf to datacontract #660

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

ReshuVishwakarma
Copy link

@ReshuVishwakarma ReshuVishwakarma commented Feb 25, 2025

Code for proto to datacontract

  • Tests pass
  • ruff format
  • README.md updated (if relevant)
  •  CHANGELOG.md entry added

Code for proto to datacontract
@jochenchrist
Copy link
Contributor

Hi @ReshuVishwakarma , thanks for contributing.

Before accepting this PR, please make sure to follow the conventions of the other Importers (e.g., https://github.com/datacontract/datacontract-cli/blob/main/datacontract/imports/avro_importer.py) and implement the abstract Importer class.

@ReshuVishwakarma
Copy link
Author

Hi @ReshuVishwakarma , thanks for contributing.

Before accepting this PR, please make sure to follow the conventions of the other Importers (e.g., https://github.com/datacontract/datacontract-cli/blob/main/datacontract/imports/avro_importer.py) and implement the abstract Importer class.

Hi @jochenchrist updated the code: subclassed the abstract Importer.

@simonharrer
Copy link
Contributor

There is an exporter for protobuf as well. You could have a look so the import and export do not work differently in regards to the field mapping.


package example;

message Product {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test with all scalar, complex and array types would be nice

@ReshuVishwakarma ReshuVishwakarma marked this pull request as draft March 3, 2025 14:02
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.

3 participants