Fix to docker import issues and swagger error
This is actually two fixes in one change:
1. Fixing the import issues in the docker containers, also cleaning
it up.
2. Avoiding the creation of multiple swagger.json files by specifying
which of the proto files represent the top-level service.
Change-Id: I9fec5cf48df127725673ba53f0e91d2ed2e275ad
diff --git a/chameleon/protos/schema.proto b/chameleon/protos/schema.proto
index 0c06feb..764f53f 100644
--- a/chameleon/protos/schema.proto
+++ b/chameleon/protos/schema.proto
@@ -17,6 +17,9 @@
// Proto files
repeated ProtoFile protos = 1;
+ // Name of proto file to generae swagger.json from
+ string swagger_from = 2;
+
}
// Schema services
diff --git a/chameleon/protos/schema_pb2.py b/chameleon/protos/schema_pb2.py
index 537ba02..6f45cc6 100644
--- a/chameleon/protos/schema_pb2.py
+++ b/chameleon/protos/schema_pb2.py
@@ -20,7 +20,7 @@
name='schema.proto',
package='schema',
syntax='proto3',
- serialized_pb=_b('\n\x0cschema.proto\x12\x06schema\x1a\x1bgoogle/protobuf/empty.proto\"A\n\tProtoFile\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12\r\n\x05proto\x18\x02 \x01(\t\x12\x12\n\ndescriptor\x18\x03 \x01(\x0c\",\n\x07Schemas\x12!\n\x06protos\x18\x01 \x03(\x0b\x32\x11.schema.ProtoFile2G\n\rSchemaService\x12\x36\n\tGetSchema\x12\x16.google.protobuf.Empty\x1a\x0f.schema.Schemas\"\x00\x62\x06proto3')
+ serialized_pb=_b('\n\x0cschema.proto\x12\x06schema\x1a\x1bgoogle/protobuf/empty.proto\"A\n\tProtoFile\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12\r\n\x05proto\x18\x02 \x01(\t\x12\x12\n\ndescriptor\x18\x03 \x01(\x0c\"B\n\x07Schemas\x12!\n\x06protos\x18\x01 \x03(\x0b\x32\x11.schema.ProtoFile\x12\x14\n\x0cswagger_from\x18\x02 \x01(\t2G\n\rSchemaService\x12\x36\n\tGetSchema\x12\x16.google.protobuf.Empty\x1a\x0f.schema.Schemas\"\x00\x62\x06proto3')
,
dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
@@ -87,6 +87,13 @@
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
+ _descriptor.FieldDescriptor(
+ name='swagger_from', full_name='schema.Schemas.swagger_from', index=1,
+ number=2, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
],
extensions=[
],
@@ -100,7 +107,7 @@
oneofs=[
],
serialized_start=120,
- serialized_end=164,
+ serialized_end=186,
)
_SCHEMAS.fields_by_name['protos'].message_type = _PROTOFILE
@@ -172,6 +179,11 @@
class BetaSchemaServiceServicer(object):
+ """The Beta API is deprecated for 0.15.0 and later.
+
+ It is recommended to use the GA API (classes and functions in this
+ file not marked beta) for all further purposes. This class was generated
+ only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
"""Schema services
"""
def GetSchema(self, request, context):
@@ -181,6 +193,11 @@
class BetaSchemaServiceStub(object):
+ """The Beta API is deprecated for 0.15.0 and later.
+
+ It is recommended to use the GA API (classes and functions in this
+ file not marked beta) for all further purposes. This class was generated
+ only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
"""Schema services
"""
def GetSchema(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
@@ -191,6 +208,11 @@
def beta_create_SchemaService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
+ """The Beta API is deprecated for 0.15.0 and later.
+
+ It is recommended to use the GA API (classes and functions in this
+ file not marked beta) for all further purposes. This function was
+ generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('schema.SchemaService', 'GetSchema'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
}
@@ -205,6 +227,11 @@
def beta_create_SchemaService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
+ """The Beta API is deprecated for 0.15.0 and later.
+
+ It is recommended to use the GA API (classes and functions in this
+ file not marked beta) for all further purposes. This function was
+ generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_serializers = {
('schema.SchemaService', 'GetSchema'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
}