diff --git a/core/src/main/java/com/linecorp/armeria/server/docs/JsonSchemaGenerator.java b/core/src/main/java/com/linecorp/armeria/server/docs/JsonSchemaGenerator.java index 8f81d157347..9796d3d15b2 100644 --- a/core/src/main/java/com/linecorp/armeria/server/docs/JsonSchemaGenerator.java +++ b/core/src/main/java/com/linecorp/armeria/server/docs/JsonSchemaGenerator.java @@ -77,7 +77,7 @@ private JsonSchemaGenerator(ServiceSpecification serviceSpecification) { ImmutableMap.builderWithExpectedSize(serviceSpecification.structs().size()); for (StructInfo struct : serviceSpecification.structs()) { typeSignatureToStructMappingBuilder.put(struct.name(), struct); - if (struct.alias() != null) { + if (struct.alias() != null && !struct.alias().equals(struct.name())) { // TypeSignature.signature() could be StructInfo.alias() if the type is a protobuf Message. typeSignatureToStructMappingBuilder.put(struct.alias(), struct); }