aptos icon indicating copy to clipboard operation
aptos copied to clipboard

Add support for Google Protocol Buffers

Open jasonwalsh opened this issue 8 years ago • 16 comments

Currently, aptos supports converting JSON Schema documents into the Apache Avro data-interchange format.

A proposed class in the visitor module (e.g ProtobufSchemaVisitor) should yield the converted Protocol Buffers document.

jasonwalsh avatar Aug 21 '17 14:08 jasonwalsh

Your issue doesn't follow our guidelines. Please fix the following:

  • Issue description cannot be empty (?)

Click here for details.

Thank you! :pray: This comment was made by GitMagic – Magically enforcing your contribution guidelines.

ghost avatar Aug 21 '17 14:08 ghost

Your issue doesn't follow our guidelines. Please fix the following:

  • Issue description cannot be empty (?)

Click here for details.

Thank you! :pray: This comment was made by GitMagic – Magically enforcing your contribution guidelines.

ghost avatar Aug 21 '17 14:08 ghost

Thank you, everything looks good now! :bowtie:

ghost avatar Aug 21 '17 14:08 ghost

Hey i can help with this, can you tell me what should be the output ? For example , i should be able to do : aptos convert -format protobuf example-schema.json and aptos should output .proto defination file for the given schema ? is this requirement correct ?

subhajeet2107 avatar Sep 19 '17 18:09 subhajeet2107

Hey @subhajeet2107, thank you for your interest in contributing! Yes, your command: aptos convert -format protobuf example-schema.json is correct.

Something like:

{
    "title": "Person",
    "type": "object",
    "properties": {
        "firstName": {
            "type": "string"
        }
    },
    "required": [ "firstName" ]
}

Would yield the following .proto file:

message Person {
    required string firstName = 1;
}

That's a really basic example, but I think starting with the primitive types, (e.g. string, integer, number, boolean, etc.) would be the easiest and then we can focus on the more complex types like array(s), object(s), enumeration(s), etc.

jasonwalsh avatar Sep 19 '17 18:09 jasonwalsh

Hi @rightlag are you open to using a template engine like Jinja2 for this?

malrusha avatar Sep 26 '17 23:09 malrusha

Hi @malrusha, that's a great idea! I'm fine with using a template system like Jinja2.

jasonwalsh avatar Sep 27 '17 00:09 jasonwalsh

Hi, what would be the latest expected release date for protocol buffer support ?

runflowcode avatar Oct 03 '17 18:10 runflowcode

Hi @blaisezzz, I'd like to have support for protocol buffers by mid to late October.

jasonwalsh avatar Oct 06 '17 14:10 jasonwalsh

I've created a new branch feature/protobuf to track all changes. I'll be updating shortly.

jasonwalsh avatar Oct 07 '17 11:10 jasonwalsh

@jasonwalsh since this thread has been inactive for quite a while, can I work on this ?

ajainuary avatar Jun 25 '18 13:06 ajainuary

Hi @ajainuary

Thank you for your interest in the project! Sure, that would be great! 👍

Feel free to submit a PR.

jasonwalsh avatar Jun 25 '18 13:06 jasonwalsh

can I take this up?

Nayan-Das avatar Oct 24 '18 12:10 Nayan-Das

@Nayan-Das Sure!

jasonwalsh avatar Oct 24 '18 13:10 jasonwalsh

Ok..I am working on it.

Nayan-Das avatar Oct 27 '18 10:10 Nayan-Das

It looks like this is still open. Any change in the requirement?

domu904 avatar Aug 08 '19 02:08 domu904