SweetWuXiaoMei commented on code in PR #5012:
URL:
https://github.com/apache/servicecomb-java-chassis/pull/5012#discussion_r2508550520
##########
swagger/swagger-generator/generator-core/src/test/java/org/apache/servicecomb/swagger/generator/core/TestSwaggerUtils.java:
##########
@@ -161,5 +181,15 @@ public void test_resolve_type_schemas_correct() {
// should be ObjectSchema but swagger is not.
// <pre> Assertions.assertTrue(schema instanceof ObjectSchema) </pre>
Assertions.assertEquals("object", schema.getType());
+
+ openAPI = new OpenAPI();
+ schema = SwaggerUtils.resolveTypeSchemas(openAPI, TestTypeClass.class);
+ schema = SwaggerUtils.getSchema(openAPI, schema); // resolve reference
+ Assertions.assertEquals("object", schema.getType());
+
+ openAPI = new OpenAPI();
+ schema = SwaggerUtils.resolveTypeSchemas(openAPI, TestTypeRecord.class);
+ schema = SwaggerUtils.getSchema(openAPI, schema); // resolve reference
Review Comment:
may be combined into a single line code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]