You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/01/16 08:37:17 UTC
[servicecomb-java-chassis] Diff for: [GitHub] liubao68 merged pull request
#1060: [SCB-945] Enhance swagger to IDL
diff --git a/LICENSE b/LICENSE
index 3ab3057d2..a1e780bc8 100644
--- a/LICENSE
+++ b/LICENSE
@@ -240,7 +240,7 @@ For foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/ArrayFie
foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/FieldSchema.java
foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/FieldTypeUtils.java
foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/HashFieldMapEx.java
- foundations/foundation-protobuf/src/main/java/io/protostuff/ByteBufferInputEx.java
+ foundations/foundation-protobuf/src/main/java/io/protostuff/ByteArrayInputEx.java
foundations/foundation-protobuf/src/main/java/io/protostuff/InputEx.java
foundations/foundation-protobuf/src/main/java/io/protostuff/OutputEx.java
foundations/foundation-protobuf/src/main/java/io/protostuff/package-info.java
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoMethod.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoMethod.java
index 4ae87ae7e..e8d8a093c 100644
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoMethod.java
+++ b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoMethod.java
@@ -28,8 +28,6 @@
public class ProtoMethod {
private String argTypeName;
- private boolean argWrapped;
-
@JsonProperty
// key is status
private Map<Integer, ProtoResponse> responses = new HashMap<>();
@@ -44,14 +42,6 @@ public void setArgTypeName(String argTypeName) {
this.argTypeName = argTypeName;
}
- public boolean isArgWrapped() {
- return argWrapped;
- }
-
- public void setArgWrapped(boolean argWrapped) {
- this.argWrapped = argWrapped;
- }
-
public void addResponse(String status, ProtoResponse response) {
if (status.equals("default")) {
defaultResponse = response;
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoResponse.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoResponse.java
index feaa4065f..19510f62d 100644
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoResponse.java
+++ b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoResponse.java
@@ -19,8 +19,6 @@
public class ProtoResponse {
private String typeName;
- private boolean wrapped;
-
public String getTypeName() {
return typeName;
}
@@ -28,12 +26,4 @@ public String getTypeName() {
public void setTypeName(String typeName) {
this.typeName = typeName;
}
-
- public boolean isWrapped() {
- return wrapped;
- }
-
- public void setWrapped(boolean wrapped) {
- this.wrapped = wrapped;
- }
}
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoToStringGenerator.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoToStringGenerator.java
index 4e1b9edb2..589cad8a1 100644
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoToStringGenerator.java
+++ b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/ProtoToStringGenerator.java
@@ -18,6 +18,10 @@
import static org.apache.servicecomb.foundation.common.utils.StringBuilderUtils.appendLine;
+import java.util.List;
+
+import com.google.common.base.Strings;
+
import io.protostuff.compiler.model.Enum;
import io.protostuff.compiler.model.EnumConstant;
import io.protostuff.compiler.model.Field;
@@ -59,9 +63,7 @@ public String protoToString() {
private void serviceToString(Service service, StringBuilder sb) {
appendLine(sb, "service %s {", service.getName());
for (ServiceMethod serviceMethod : service.getMethods()) {
- if (!serviceMethod.getCommentLines().isEmpty()) {
- appendLine(sb, " //" + serviceMethod.getComments());
- }
+ commentsToString(serviceMethod.getCommentLines(), sb, 2);
appendLine(sb, " rpc %s (%s) returns (%s);\n", serviceMethod.getName(), serviceMethod.getArgTypeName(),
serviceMethod.getReturnTypeName());
}
@@ -79,7 +81,20 @@ protected void enumToString(Enum enumValue, StringBuilder sb) {
sb.append("}\n\n");
}
+ private void commentsToString(List<String> comments, StringBuilder sb, int padLeft) {
+ if (comments.isEmpty()) {
+ return;
+ }
+
+ String pad = Strings.repeat(" ", padLeft) + "//";
+ for (String comment : comments) {
+ sb.append(pad);
+ appendLine(sb, comment);
+ }
+ }
+
private void messageToString(Message message, StringBuilder sb) {
+ commentsToString(message.getCommentLines(), sb, 0);
appendLine(sb, "message %s {", message.getName());
for (Field field : message.getFields()) {
sb.append(" ");
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerToProtoGenerator.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerToProtoGenerator.java
index cd8942a9f..c200917b2 100644
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerToProtoGenerator.java
+++ b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerToProtoGenerator.java
@@ -22,6 +22,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -60,7 +61,7 @@
private final Set<String> messages = new HashSet<>();
- private final List<Runnable> pending = new ArrayList<>();
+ private List<Runnable> pending = new ArrayList<>();
// not java package
// better to be: app_${app}.mid_{microservice}.sid_{schemaId}
@@ -72,8 +73,15 @@ public SwaggerToProtoGenerator(String protoPackage, Swagger swagger) {
public Proto convert() {
convertDefinitions();
convertOperations();
- for (Runnable runnable : pending) {
- runnable.run();
+ for (; ; ) {
+ List<Runnable> oldPending = pending;
+ pending = new ArrayList<>();
+ for (Runnable runnable : oldPending) {
+ runnable.run();
+ }
+ if (pending.isEmpty()) {
+ break;
+ }
}
return createProto();
@@ -89,6 +97,7 @@ private void convertDefinitions() {
}
}
+ @SuppressWarnings("unchecked")
private void convertDefinition(String modelName, ModelImpl model) {
Map<String, Property> properties = model.getProperties();
if (properties == null) {
@@ -96,12 +105,23 @@ private void convertDefinition(String modelName, ModelImpl model) {
properties = Collections.emptyMap();
}
- // complex
- messages.add(modelName);
- appendLine(msgStringBuilder, "message %s {", modelName);
+ createMessage(modelName, (Map<String, Object>) (Object) properties);
+ }
+
+ private void createMessage(String protoName, Map<String, Object> properties, String... annotations) {
+ if (!messages.add(protoName)) {
+ // already created
+ return;
+ }
+
+ for (String annotation : annotations) {
+ msgStringBuilder.append("//");
+ appendLine(msgStringBuilder, annotation);
+ }
+ appendLine(msgStringBuilder, "message %s {", protoName);
int tag = 1;
- for (Entry<String, Property> entry : properties.entrySet()) {
- Property property = entry.getValue();
+ for (Entry<String, Object> entry : properties.entrySet()) {
+ Object property = entry.getValue();
String propertyType = convertSwaggerType(property);
appendLine(msgStringBuilder, " %s %s = %d;", propertyType, entry.getKey(), tag);
@@ -140,14 +160,14 @@ private String convertSwaggerType(Object swaggerType) {
return type;
}
- Property property = adapter.getArrayItem();
- if (property != null) {
- return "repeated " + convertSwaggerType(property);
+ Property itemProperty = adapter.getArrayItem();
+ if (itemProperty != null) {
+ return "repeated " + convertArrayOrMapItem(itemProperty);
}
- property = adapter.getMapItem();
- if (property != null) {
- return String.format("map<string, %s>", convertSwaggerType(property));
+ itemProperty = adapter.getMapItem();
+ if (itemProperty != null) {
+ return String.format("map<string, %s>", convertArrayOrMapItem(itemProperty));
}
if (adapter.isObject()) {
@@ -160,6 +180,44 @@ private String convertSwaggerType(Object swaggerType) {
Json.encode(swaggerType)));
}
+ private String convertArrayOrMapItem(Property itemProperty) {
+ SwaggerTypeAdapter itemAdapter = SwaggerTypeAdapter.create(itemProperty);
+ // List<List<>>, need to wrap
+ if (itemAdapter.getArrayItem() != null) {
+ String protoName = generateWrapPropertyName(List.class.getSimpleName(), itemAdapter.getArrayItem());
+ pending.add(() -> wrapPropertyToMessage(protoName, itemProperty));
+ return protoName;
+ }
+
+ // List<Map<>>, need to wrap
+ if (itemAdapter.getMapItem() != null) {
+ String protoName = generateWrapPropertyName(Map.class.getSimpleName(), itemAdapter.getMapItem());
+ pending.add(() -> wrapPropertyToMessage(protoName, itemProperty));
+ return protoName;
+ }
+
+ return convertSwaggerType(itemProperty);
+ }
+
+ private String generateWrapPropertyName(String prefix, Property property) {
+ SwaggerTypeAdapter adapter = SwaggerTypeAdapter.create(property);
+ // List<List<>>, need to wrap
+ if (adapter.getArrayItem() != null) {
+ return generateWrapPropertyName(prefix + List.class.getSimpleName(), adapter.getArrayItem());
+ }
+
+ // List<Map<>>, need to wrap
+ if (adapter.getMapItem() != null) {
+ return generateWrapPropertyName(prefix + Map.class.getSimpleName(), adapter.getMapItem());
+ }
+
+ return prefix + StringUtils.capitalize(convertSwaggerType(adapter));
+ }
+
+ private void wrapPropertyToMessage(String protoName, Property property) {
+ createMessage(protoName, Collections.singletonMap("value", property), ProtoConst.ANNOTATION_WRAP_PROPERTY);
+ }
+
private String tryFindEnumType(List<String> enums) {
if (enums != null && !enums.isEmpty()) {
String strEnums = enums.toString();
@@ -225,19 +283,19 @@ private void convertOperations() {
appendLine(serviceBuilder, "service MainService {");
for (Path path : paths.values()) {
for (Operation operation : path.getOperationMap().values()) {
- convertOpeation(operation);
+ convertOperation(operation);
}
}
serviceBuilder.setLength(serviceBuilder.length() - 1);
appendLine(serviceBuilder, "}");
}
- private void convertOpeation(Operation operation) {
+ private void convertOperation(Operation operation) {
ProtoMethod protoMethod = new ProtoMethod();
fillRequestType(operation, protoMethod);
fillResponseType(operation, protoMethod);
- appendLine(serviceBuilder, " //%s%s", ProtoConst.OP_HINT, Json.encode(protoMethod));
+ appendLine(serviceBuilder, " //%s%s", ProtoConst.ANNOTATION_RPC, Json.encode(protoMethod));
appendLine(serviceBuilder, " rpc %s (%s) returns (%s);\n", operation.getOperationId(),
protoMethod.getArgTypeName(),
protoMethod.findResponse(Status.OK.getStatusCode()).getTypeName());
@@ -259,26 +317,23 @@ private void fillRequestType(Operation operation, ProtoMethod protoMethod) {
}
}
- String wrapName = operation.getOperationId() + "RequestWrap";
+ String wrapName = StringUtils.capitalize(operation.getOperationId()) + "RequestWrap";
createWrapArgs(wrapName, parameters);
- protoMethod.setArgWrapped(true);
protoMethod.setArgTypeName(wrapName);
}
private void fillResponseType(Operation operation, ProtoMethod protoMethod) {
for (Entry<String, Response> entry : operation.getResponses().entrySet()) {
String type = convertSwaggerType(entry.getValue().getSchema());
+ boolean wrapped = !messages.contains(type);
ProtoResponse protoResponse = new ProtoResponse();
- protoResponse.setWrapped(!messages.contains(type));
protoResponse.setTypeName(type);
- if (protoResponse.isWrapped()) {
- String wrapName = operation.getOperationId() + "ResponseWrap" + entry.getKey();
- appendLine(msgStringBuilder, "message %s {", wrapName);
- appendLine(msgStringBuilder, " %s response = 1;", type);
- appendLine(msgStringBuilder, "}");
+ if (wrapped) {
+ String wrapName = StringUtils.capitalize(operation.getOperationId()) + "ResponseWrap" + entry.getKey();
+ wrapPropertyToMessage(wrapName, entry.getValue().getSchema());
protoResponse.setTypeName(wrapName);
}
@@ -287,16 +342,11 @@ private void fillResponseType(Operation operation, ProtoMethod protoMethod) {
}
private void createWrapArgs(String wrapName, List<Parameter> parameters) {
- appendLine(msgStringBuilder, "message %s {", wrapName);
-
- int idx = 1;
+ Map<String, Object> properties = new LinkedHashMap<>();
for (Parameter parameter : parameters) {
- String type = convertSwaggerType(parameter);
- appendLine(msgStringBuilder, " %s %s = %d;", type, parameter.getName(), idx);
- idx++;
+ properties.put(parameter.getName(), parameter);
}
-
- appendLine(msgStringBuilder, "}");
+ createMessage(wrapName, properties, ProtoConst.ANNOTATION_WRAP_ARGUMENTS);
}
protected Proto createProto() {
diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerTypeAdapter.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerTypeAdapter.java
index 235ebe89f..dacaf6d44 100644
--- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerTypeAdapter.java
+++ b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerTypeAdapter.java
@@ -24,6 +24,10 @@
public interface SwaggerTypeAdapter {
static SwaggerTypeAdapter create(Object swaggerType) {
+ if (swaggerType instanceof SwaggerTypeAdapter) {
+ return (SwaggerTypeAdapter) swaggerType;
+ }
+
if (swaggerType instanceof Property) {
return new PropertyAdapter((Property) swaggerType);
}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/TestSwaggerToProtoGenerator.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/TestSwaggerToProtoGenerator.java
index 4b604a4da..5e3ba28d7 100644
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/TestSwaggerToProtoGenerator.java
+++ b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/TestSwaggerToProtoGenerator.java
@@ -16,8 +16,11 @@
*/
package org.apache.servicecomb.codec.protobuf.internal.converter;
+import java.io.IOException;
+import java.net.URL;
+
+import org.apache.commons.io.IOUtils;
import org.apache.servicecomb.codec.protobuf.internal.converter.model.ProtoSchema;
-import org.apache.servicecomb.foundation.test.scaffolding.model.Color;
import org.apache.servicecomb.swagger.generator.core.SwaggerGenerator;
import org.apache.servicecomb.swagger.generator.core.SwaggerGeneratorContext;
import org.apache.servicecomb.swagger.generator.springmvc.SpringmvcSwaggerGeneratorContext;
@@ -26,151 +29,15 @@
import io.protostuff.compiler.model.Proto;
import io.swagger.models.Swagger;
-import io.vertx.core.json.Json;
public class TestSwaggerToProtoGenerator {
- static String protoContent = "syntax = \"proto3\";\n"
- + "import \"google/protobuf/empty.proto\";\n"
- + "import \"google/protobuf/any.proto\";\n"
- + "package a.b;\n"
- + "\n"
- + "message Empty {\n"
- + "}\n"
- + "\n"
- + "message User {\n"
- + " string name = 1;\n"
- + " repeated User friends = 2;\n"
- + "}\n"
- + "\n"
- + "message Ref1 {\n"
- + " Ref2 ref = 1;\n"
- + "}\n"
- + "\n"
- + "message Ref2 {\n"
- + " Ref1 ref = 1;\n"
- + "}\n"
- + "\n"
- + "message baseRequestWrap {\n"
- + " bool boolValue = 1;\n"
- + " int32 iValue = 2;\n"
- + " int64 lValue = 3;\n"
- + " float fValue = 4;\n"
- + " double dValue = 5;\n"
- + " string sValue = 6;\n"
- + " repeated int32 iArray = 7;\n"
- + " Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 color = 8;\n"
- + " int64 localDate = 9;\n"
- + " int64 date = 10;\n"
- + " Empty empty = 11;\n"
- + "}\n"
- + "\n"
- + "message baseResponseWrap444 {\n"
- + " Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 response = 1;\n"
- + "}\n"
- + "\n"
- + "message baseResponseWrap200 {\n"
- + " int32 response = 1;\n"
- + "}\n"
- + "\n"
- + "message bytesRequestWrap {\n"
- + " bytes value = 1;\n"
- + "}\n"
- + "\n"
- + "message bytesResponseWrap200 {\n"
- + " bytes response = 1;\n"
- + "}\n"
- + "\n"
- + "message colorBodyRequestWrap {\n"
- + " Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 color = 1;\n"
- + "}\n"
- + "\n"
- + "message colorBodyResponseWrap200 {\n"
- + " Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 response = 1;\n"
- + "}\n"
- + "\n"
- + "message listObjRequestWrap {\n"
- + " repeated google.protobuf.Any objs = 1;\n"
- + "}\n"
- + "\n"
- + "message listObjResponseWrap200 {\n"
- + " repeated google.protobuf.Any response = 1;\n"
- + "}\n"
- + "\n"
- + "message listUserRequestWrap {\n"
- + " repeated User users = 1;\n"
- + "}\n"
- + "\n"
- + "message listUserResponseWrap200 {\n"
- + " repeated User response = 1;\n"
- + "}\n"
- + "\n"
- + "message mapObjRequestWrap {\n"
- + " map<string, google.protobuf.Any> objs = 1;\n"
- + "}\n"
- + "\n"
- + "message mapObjResponseWrap200 {\n"
- + " map<string, google.protobuf.Any> response = 1;\n"
- + "}\n"
- + "\n"
- + "message mapUserRequestWrap {\n"
- + " map<string, User> users = 1;\n"
- + "}\n"
- + "\n"
- + "message mapUserResponseWrap200 {\n"
- + " map<string, User> response = 1;\n"
- + "}\n"
- + "\n"
- + "message userWrapInProtobufRequestWrap {\n"
- + " User user = 1;\n"
- + " int32 ivalue = 2;\n"
- + "}\n"
- + "\n"
- + "enum Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 {\n"
- + " RED = 0;\n"
- + " YELLOW = 1;\n"
- + " BLUE = 2;\n"
- + "}\n"
- + "\n"
- + "service MainService {\n"
- + " //scb:{\"argTypeName\":\"baseRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"baseResponseWrap200\",\"wrapped\":true},\"444\":{\"typeName\":\"baseResponseWrap444\",\"wrapped\":true}}}\n"
- + " rpc base (baseRequestWrap) returns (baseResponseWrap200);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"bytesRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"bytesResponseWrap200\",\"wrapped\":true}}}\n"
- + " rpc bytes (bytesRequestWrap) returns (bytesResponseWrap200);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"colorBodyRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"colorBodyResponseWrap200\",\"wrapped\":true}}}\n"
- + " rpc colorBody (colorBodyRequestWrap) returns (colorBodyResponseWrap200);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"listObjRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"listObjResponseWrap200\",\"wrapped\":true}}}\n"
- + " rpc listObj (listObjRequestWrap) returns (listObjResponseWrap200);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"listUserRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"listUserResponseWrap200\",\"wrapped\":true}}}\n"
- + " rpc listUser (listUserRequestWrap) returns (listUserResponseWrap200);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"mapObjRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"mapObjResponseWrap200\",\"wrapped\":true}}}\n"
- + " rpc mapObj (mapObjRequestWrap) returns (mapObjResponseWrap200);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"mapUserRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"mapUserResponseWrap200\",\"wrapped\":true}}}\n"
- + " rpc mapUser (mapUserRequestWrap) returns (mapUserResponseWrap200);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"google.protobuf.Empty\",\"argWrapped\":false,\"responses\":{\"200\":{\"typeName\":\"google.protobuf.Empty\",\"wrapped\":false}}}\n"
- + " rpc noParamVoid (google.protobuf.Empty) returns (google.protobuf.Empty);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"google.protobuf.Any\",\"argWrapped\":false,\"responses\":{\"200\":{\"typeName\":\"google.protobuf.Any\",\"wrapped\":false}}}\n"
- + " rpc obj (google.protobuf.Any) returns (google.protobuf.Any);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"Ref1\",\"argWrapped\":false,\"responses\":{\"200\":{\"typeName\":\"Ref2\",\"wrapped\":false}}}\n"
- + " rpc ref (Ref1) returns (Ref2);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"User\",\"argWrapped\":false,\"responses\":{\"200\":{\"typeName\":\"User\",\"wrapped\":false}}}\n"
- + " rpc user (User) returns (User);\n"
- + "\n"
- + " //scb:{\"argTypeName\":\"userWrapInProtobufRequestWrap\",\"argWrapped\":true,\"responses\":{\"200\":{\"typeName\":\"User\",\"wrapped\":false}}}\n"
- + " rpc userWrapInProtobuf (userWrapInProtobufRequestWrap) returns (User);\n"
- + "}\n";
-
@Test
- public void convert() {
+ public void convert() throws IOException {
+ URL url = TestSwaggerToProtoGenerator.class.getClassLoader().getResource("ProtoSchema.proto");
+ String protoContent = IOUtils.toString(url);
+ int idx = protoContent.indexOf("syntax = ");
+ protoContent = protoContent.substring(idx);
+
SwaggerGeneratorContext context = new SpringmvcSwaggerGeneratorContext();
SwaggerGenerator swaggerGenerator = new SwaggerGenerator(context, ProtoSchema.class);
Swagger swagger = swaggerGenerator.generate();
@@ -180,12 +47,4 @@ public void convert() {
Assert.assertEquals(protoContent, new ProtoToStringGenerator(proto).protoToString());
}
-
- public static void main(String[] args) {
- String json = Json.encode(Color.BLUE);
- System.out.println(json);
- System.out.println(Json.decodeValue(json, Color.class));
- System.out.println(Json.decodeValue("2", Color.class));
- System.out.println(Json.mapper.convertValue("BLUE", Color.class));
- }
}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/model/FieldNeedWrap.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/model/FieldNeedWrap.java
new file mode 100644
index 000000000..f97b6b50a
--- /dev/null
+++ b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/model/FieldNeedWrap.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.codec.protobuf.internal.converter.model;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.servicecomb.foundation.test.scaffolding.model.User;
+
+public class FieldNeedWrap {
+ public List<List<User>> listListUser;
+
+ public List<Map<String, User>> listMapUser;
+
+ public Map<String, List<User>> mapListUser;
+
+ public Map<String, Map<String, User>> mapMapUser;
+
+ public List<List<List<User>>> listListListUser;
+
+ public List<List<Map<String, User>>> listListMapUser;
+
+ public List<Map<String, List<User>>> listMapListUser;
+
+ public List<Map<String, Map<String, User>>> listMapMapUser;
+
+ public Map<String, Map<String, List<User>>> mapMapListUser;
+
+ public Map<String, Map<String, Map<String, User>>> mapMapMapUser;
+}
diff --git a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/model/ProtoSchema.java b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/model/ProtoSchema.java
index 3b046ec72..64afea6ac 100644
--- a/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/model/ProtoSchema.java
+++ b/common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/internal/converter/model/ProtoSchema.java
@@ -26,6 +26,7 @@
import org.apache.servicecomb.foundation.test.scaffolding.model.Empty;
import org.apache.servicecomb.foundation.test.scaffolding.model.User;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -95,4 +96,82 @@ public Ref2 ref(@RequestBody Ref1 ref) {
@GetMapping(path = "/noParamVoid")
public void noParamVoid() {
}
+
+ @PostMapping(path = "/listListString")
+ public List<List<String>> listListString(@RequestBody List<List<String>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/listListUser")
+ public List<List<User>> listListUser(@RequestBody List<List<User>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/listMapString")
+ public List<Map<String, String>> listMapString(@RequestBody List<Map<String, String>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/listMapUser")
+ public List<Map<String, User>> listMapUser(@RequestBody List<Map<String, User>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/mapListString")
+ public Map<String, List<String>> mapListString(@RequestBody Map<String, List<String>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/mapListUser")
+ public Map<String, List<User>> mapListUser(@RequestBody Map<String, List<User>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/mapMapString")
+ public Map<String, Map<String, String>> mapMapString(@RequestBody Map<String, Map<String, String>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/mapMapUser")
+ public Map<String, Map<String, User>> mapMapUser(@RequestBody Map<String, Map<String, User>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/listListListString")
+ public List<List<List<String>>> listListListString(@RequestBody List<List<List<String>>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/listListMapString")
+ public List<List<Map<String, String>>> listListMapString(@RequestBody List<List<Map<String, String>>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/listMapListString")
+ public List<Map<String, List<String>>> listMapListString(@RequestBody List<Map<String, List<String>>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/listMapMapString")
+ public List<Map<String, Map<String, String>>> listMapMapString(
+ @RequestBody List<Map<String, Map<String, String>>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/mapMapListString")
+ public Map<String, Map<String, List<String>>> mapMapListString(
+ @RequestBody Map<String, Map<String, List<String>>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/mapMapMapString")
+ public Map<String, Map<String, Map<String, String>>> mapMapMapString(
+ @RequestBody Map<String, Map<String, Map<String, String>>> value) {
+ return value;
+ }
+
+ @PostMapping(path = "/fieldNeedWrap")
+ public FieldNeedWrap fieldNeedWrap(@RequestBody FieldNeedWrap fieldNeedWrap) {
+ return fieldNeedWrap;
+ }
}
diff --git a/common/common-protobuf/src/test/resources/ProtoSchema.proto b/common/common-protobuf/src/test/resources/ProtoSchema.proto
new file mode 100644
index 000000000..cb78e18d8
--- /dev/null
+++ b/common/common-protobuf/src/test/resources/ProtoSchema.proto
@@ -0,0 +1,430 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+syntax = "proto3";
+import "google/protobuf/empty.proto";
+import "google/protobuf/any.proto";
+package a.b;
+
+message Empty {
+}
+
+message FieldNeedWrap {
+ repeated ListUser listListUser = 1;
+ repeated MapUser listMapUser = 2;
+ map<string, ListUser> mapListUser = 3;
+ map<string, MapUser> mapMapUser = 4;
+ repeated ListListUser listListListUser = 5;
+ repeated ListMapUser listListMapUser = 6;
+ repeated MapListUser listMapListUser = 7;
+ repeated MapMapUser listMapMapUser = 8;
+ map<string, MapListUser> mapMapListUser = 9;
+ map<string, MapMapUser> mapMapMapUser = 10;
+}
+
+message User {
+ string name = 1;
+ repeated User friends = 2;
+}
+
+message Ref1 {
+ Ref2 ref = 1;
+}
+
+message Ref2 {
+ Ref1 ref = 1;
+}
+
+//@WrapArguments
+message BaseRequestWrap {
+ bool boolValue = 1;
+ int32 iValue = 2;
+ int64 lValue = 3;
+ float fValue = 4;
+ double dValue = 5;
+ string sValue = 6;
+ repeated int32 iArray = 7;
+ Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 color = 8;
+ int64 localDate = 9;
+ int64 date = 10;
+ Empty empty = 11;
+}
+
+//@WrapProperty
+message BaseResponseWrap444 {
+ Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 value = 1;
+}
+
+//@WrapProperty
+message BaseResponseWrap200 {
+ int32 value = 1;
+}
+
+//@WrapArguments
+message BytesRequestWrap {
+ bytes value = 1;
+}
+
+//@WrapProperty
+message BytesResponseWrap200 {
+ bytes value = 1;
+}
+
+//@WrapArguments
+message ColorBodyRequestWrap {
+ Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 color = 1;
+}
+
+//@WrapProperty
+message ColorBodyResponseWrap200 {
+ Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 value = 1;
+}
+
+//@WrapArguments
+message ListListListStringRequestWrap {
+ repeated ListListString value = 1;
+}
+
+//@WrapProperty
+message ListListListStringResponseWrap200 {
+ repeated ListListString value = 1;
+}
+
+//@WrapArguments
+message ListListMapStringRequestWrap {
+ repeated ListMapString value = 1;
+}
+
+//@WrapProperty
+message ListListMapStringResponseWrap200 {
+ repeated ListMapString value = 1;
+}
+
+//@WrapArguments
+message ListListStringRequestWrap {
+ repeated ListString value = 1;
+}
+
+//@WrapProperty
+message ListListStringResponseWrap200 {
+ repeated ListString value = 1;
+}
+
+//@WrapArguments
+message ListListUserRequestWrap {
+ repeated ListUser value = 1;
+}
+
+//@WrapProperty
+message ListListUserResponseWrap200 {
+ repeated ListUser value = 1;
+}
+
+//@WrapArguments
+message ListMapListStringRequestWrap {
+ repeated MapListString value = 1;
+}
+
+//@WrapProperty
+message ListMapListStringResponseWrap200 {
+ repeated MapListString value = 1;
+}
+
+//@WrapArguments
+message ListMapMapStringRequestWrap {
+ repeated MapMapString value = 1;
+}
+
+//@WrapProperty
+message ListMapMapStringResponseWrap200 {
+ repeated MapMapString value = 1;
+}
+
+//@WrapArguments
+message ListMapStringRequestWrap {
+ repeated MapString value = 1;
+}
+
+//@WrapProperty
+message ListMapStringResponseWrap200 {
+ repeated MapString value = 1;
+}
+
+//@WrapArguments
+message ListMapUserRequestWrap {
+ repeated MapUser value = 1;
+}
+
+//@WrapProperty
+message ListMapUserResponseWrap200 {
+ repeated MapUser value = 1;
+}
+
+//@WrapArguments
+message ListObjRequestWrap {
+ repeated google.protobuf.Any objs = 1;
+}
+
+//@WrapProperty
+message ListObjResponseWrap200 {
+ repeated google.protobuf.Any value = 1;
+}
+
+//@WrapArguments
+message ListUserRequestWrap {
+ repeated User users = 1;
+}
+
+//@WrapProperty
+message ListUserResponseWrap200 {
+ repeated User value = 1;
+}
+
+//@WrapArguments
+message MapListStringRequestWrap {
+ map<string, ListString> value = 1;
+}
+
+//@WrapProperty
+message MapListStringResponseWrap200 {
+ map<string, ListString> value = 1;
+}
+
+//@WrapArguments
+message MapListUserRequestWrap {
+ map<string, ListUser> value = 1;
+}
+
+//@WrapProperty
+message MapListUserResponseWrap200 {
+ map<string, ListUser> value = 1;
+}
+
+//@WrapArguments
+message MapMapListStringRequestWrap {
+ map<string, MapListString> value = 1;
+}
+
+//@WrapProperty
+message MapMapListStringResponseWrap200 {
+ map<string, MapListString> value = 1;
+}
+
+//@WrapArguments
+message MapMapMapStringRequestWrap {
+ map<string, MapMapString> value = 1;
+}
+
+//@WrapProperty
+message MapMapMapStringResponseWrap200 {
+ map<string, MapMapString> value = 1;
+}
+
+//@WrapArguments
+message MapMapStringRequestWrap {
+ map<string, MapString> value = 1;
+}
+
+//@WrapProperty
+message MapMapStringResponseWrap200 {
+ map<string, MapString> value = 1;
+}
+
+//@WrapArguments
+message MapMapUserRequestWrap {
+ map<string, MapUser> value = 1;
+}
+
+//@WrapProperty
+message MapMapUserResponseWrap200 {
+ map<string, MapUser> value = 1;
+}
+
+//@WrapArguments
+message MapObjRequestWrap {
+ map<string, google.protobuf.Any> objs = 1;
+}
+
+//@WrapProperty
+message MapObjResponseWrap200 {
+ map<string, google.protobuf.Any> value = 1;
+}
+
+//@WrapArguments
+message MapUserRequestWrap {
+ map<string, User> users = 1;
+}
+
+//@WrapProperty
+message MapUserResponseWrap200 {
+ map<string, User> value = 1;
+}
+
+//@WrapArguments
+message UserWrapInProtobufRequestWrap {
+ User user = 1;
+ int32 ivalue = 2;
+}
+
+//@WrapProperty
+message ListUser {
+ repeated User value = 1;
+}
+
+//@WrapProperty
+message MapUser {
+ map<string, User> value = 1;
+}
+
+//@WrapProperty
+message ListListUser {
+ repeated ListUser value = 1;
+}
+
+//@WrapProperty
+message ListMapUser {
+ repeated MapUser value = 1;
+}
+
+//@WrapProperty
+message MapListUser {
+ map<string, ListUser> value = 1;
+}
+
+//@WrapProperty
+message MapMapUser {
+ map<string, MapUser> value = 1;
+}
+
+//@WrapProperty
+message ListListString {
+ repeated ListString value = 1;
+}
+
+//@WrapProperty
+message ListMapString {
+ repeated MapString value = 1;
+}
+
+//@WrapProperty
+message ListString {
+ repeated string value = 1;
+}
+
+//@WrapProperty
+message MapListString {
+ map<string, ListString> value = 1;
+}
+
+//@WrapProperty
+message MapMapString {
+ map<string, MapString> value = 1;
+}
+
+//@WrapProperty
+message MapString {
+ map<string, string> value = 1;
+}
+
+enum Enum_2610aa5dc6cd086cf20168892802c9c765a557f4951557340ad9f0982c53e055 {
+ RED = 0;
+ YELLOW = 1;
+ BLUE = 2;
+}
+
+service MainService {
+ //@Rpc{"argTypeName":"BaseRequestWrap","responses":{"200":{"typeName":"BaseResponseWrap200"},"444":{"typeName":"BaseResponseWrap444"}}}
+ rpc base (BaseRequestWrap) returns (BaseResponseWrap200);
+
+ //@Rpc{"argTypeName":"BytesRequestWrap","responses":{"200":{"typeName":"BytesResponseWrap200"}}}
+ rpc bytes (BytesRequestWrap) returns (BytesResponseWrap200);
+
+ //@Rpc{"argTypeName":"ColorBodyRequestWrap","responses":{"200":{"typeName":"ColorBodyResponseWrap200"}}}
+ rpc colorBody (ColorBodyRequestWrap) returns (ColorBodyResponseWrap200);
+
+ //@Rpc{"argTypeName":"FieldNeedWrap","responses":{"200":{"typeName":"FieldNeedWrap"}}}
+ rpc fieldNeedWrap (FieldNeedWrap) returns (FieldNeedWrap);
+
+ //@Rpc{"argTypeName":"ListListListStringRequestWrap","responses":{"200":{"typeName":"ListListListStringResponseWrap200"}}}
+ rpc listListListString (ListListListStringRequestWrap) returns (ListListListStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListListMapStringRequestWrap","responses":{"200":{"typeName":"ListListMapStringResponseWrap200"}}}
+ rpc listListMapString (ListListMapStringRequestWrap) returns (ListListMapStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListListStringRequestWrap","responses":{"200":{"typeName":"ListListStringResponseWrap200"}}}
+ rpc listListString (ListListStringRequestWrap) returns (ListListStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListListUserRequestWrap","responses":{"200":{"typeName":"ListListUserResponseWrap200"}}}
+ rpc listListUser (ListListUserRequestWrap) returns (ListListUserResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListMapListStringRequestWrap","responses":{"200":{"typeName":"ListMapListStringResponseWrap200"}}}
+ rpc listMapListString (ListMapListStringRequestWrap) returns (ListMapListStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListMapMapStringRequestWrap","responses":{"200":{"typeName":"ListMapMapStringResponseWrap200"}}}
+ rpc listMapMapString (ListMapMapStringRequestWrap) returns (ListMapMapStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListMapStringRequestWrap","responses":{"200":{"typeName":"ListMapStringResponseWrap200"}}}
+ rpc listMapString (ListMapStringRequestWrap) returns (ListMapStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListMapUserRequestWrap","responses":{"200":{"typeName":"ListMapUserResponseWrap200"}}}
+ rpc listMapUser (ListMapUserRequestWrap) returns (ListMapUserResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListObjRequestWrap","responses":{"200":{"typeName":"ListObjResponseWrap200"}}}
+ rpc listObj (ListObjRequestWrap) returns (ListObjResponseWrap200);
+
+ //@Rpc{"argTypeName":"ListUserRequestWrap","responses":{"200":{"typeName":"ListUserResponseWrap200"}}}
+ rpc listUser (ListUserRequestWrap) returns (ListUserResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapListStringRequestWrap","responses":{"200":{"typeName":"MapListStringResponseWrap200"}}}
+ rpc mapListString (MapListStringRequestWrap) returns (MapListStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapListUserRequestWrap","responses":{"200":{"typeName":"MapListUserResponseWrap200"}}}
+ rpc mapListUser (MapListUserRequestWrap) returns (MapListUserResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapMapListStringRequestWrap","responses":{"200":{"typeName":"MapMapListStringResponseWrap200"}}}
+ rpc mapMapListString (MapMapListStringRequestWrap) returns (MapMapListStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapMapMapStringRequestWrap","responses":{"200":{"typeName":"MapMapMapStringResponseWrap200"}}}
+ rpc mapMapMapString (MapMapMapStringRequestWrap) returns (MapMapMapStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapMapStringRequestWrap","responses":{"200":{"typeName":"MapMapStringResponseWrap200"}}}
+ rpc mapMapString (MapMapStringRequestWrap) returns (MapMapStringResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapMapUserRequestWrap","responses":{"200":{"typeName":"MapMapUserResponseWrap200"}}}
+ rpc mapMapUser (MapMapUserRequestWrap) returns (MapMapUserResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapObjRequestWrap","responses":{"200":{"typeName":"MapObjResponseWrap200"}}}
+ rpc mapObj (MapObjRequestWrap) returns (MapObjResponseWrap200);
+
+ //@Rpc{"argTypeName":"MapUserRequestWrap","responses":{"200":{"typeName":"MapUserResponseWrap200"}}}
+ rpc mapUser (MapUserRequestWrap) returns (MapUserResponseWrap200);
+
+ //@Rpc{"argTypeName":"google.protobuf.Empty","responses":{"200":{"typeName":"google.protobuf.Empty"}}}
+ rpc noParamVoid (google.protobuf.Empty) returns (google.protobuf.Empty);
+
+ //@Rpc{"argTypeName":"google.protobuf.Any","responses":{"200":{"typeName":"google.protobuf.Any"}}}
+ rpc obj (google.protobuf.Any) returns (google.protobuf.Any);
+
+ //@Rpc{"argTypeName":"Ref1","responses":{"200":{"typeName":"Ref2"}}}
+ rpc ref (Ref1) returns (Ref2);
+
+ //@Rpc{"argTypeName":"User","responses":{"200":{"typeName":"User"}}}
+ rpc user (User) returns (User);
+
+ //@Rpc{"argTypeName":"UserWrapInProtobufRequestWrap","responses":{"200":{"typeName":"User"}}}
+ rpc userWrapInProtobuf (UserWrapInProtobufRequestWrap) returns (User);
+}
diff --git a/foundations/foundation-protobuf/src/main/java/org/apache/servicecomb/foundation/protobuf/internal/ProtoConst.java b/foundations/foundation-protobuf/src/main/java/org/apache/servicecomb/foundation/protobuf/internal/ProtoConst.java
index 8d5b1d626..cc2c0ba0b 100644
--- a/foundations/foundation-protobuf/src/main/java/org/apache/servicecomb/foundation/protobuf/internal/ProtoConst.java
+++ b/foundations/foundation-protobuf/src/main/java/org/apache/servicecomb/foundation/protobuf/internal/ProtoConst.java
@@ -31,9 +31,11 @@
private ProtoConst() {
}
+ public static String ANNOTATION_WRAP_ARGUMENTS = "@WrapArguments";
+
public static String ANNOTATION_WRAP_PROPERTY = "@WrapProperty";
- public static String OP_HINT = " scb:";
+ public static String ANNOTATION_RPC = "@Rpc";
public static String PACK_SCHEMA = "type.googleapis.com/";
diff --git a/java-chassis-distribution/src/release/LICENSE b/java-chassis-distribution/src/release/LICENSE
index c9674bbf5..27bda6ef7 100644
--- a/java-chassis-distribution/src/release/LICENSE
+++ b/java-chassis-distribution/src/release/LICENSE
@@ -392,7 +392,7 @@ For foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/ArrayFie
foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/FieldSchema.java
foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/FieldTypeUtils.java
foundations/foundation-protobuf/src/main/java/io/protostuff/runtime/HashFieldMapEx.java
- foundations/foundation-protobuf/src/main/java/io/protostuff/ByteBufferInputEx.java
+ foundations/foundation-protobuf/src/main/java/io/protostuff/ByteArrayInputEx.java
foundations/foundation-protobuf/src/main/java/io/protostuff/InputEx.java
foundations/foundation-protobuf/src/main/java/io/protostuff/OutputEx.java
foundations/foundation-protobuf/src/main/java/io/protostuff/package-info.java
With regards,
Apache Git Services