Support JSON base64 bytes and enums as strings

This commit is contained in:
Daniel G. Taylor
2019-10-19 12:31:22 -07:00
parent 7fe64ad8fe
commit b5c1f1aa7c
8 changed files with 81 additions and 13 deletions

View File

@@ -1,8 +1,6 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: {{ ', '.join(description.files) }}
# plugin: python-betterproto
{% if description.enums %}import enum
{% endif %}
from dataclasses import dataclass
{% if description.typing_imports %}
from typing import {% for i in description.typing_imports %}{{ i }}{% if not loop.last %}, {% endif %}{% endfor %}
@@ -20,7 +18,7 @@ import grpclib
{% if description.enums %}{% for enum in description.enums %}
class {{ enum.name }}(enum.IntEnum):
class {{ enum.name }}(betterproto.Enum):
{% if enum.comment %}
{{ enum.comment }}