Aithosa commented on issue #4720:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/4720#issuecomment-2663042307

   请问除了去服务中心,有什么接口可以获取服务的契约吗?我记得`2.x`版本以前好像是有的🤣
   另外,`3.x`版本运行所有resources里带契约的服务都会报错,我看了下,`SwaggerUtils.java`
   ```java
     public static OpenAPI parseAndValidateSwagger(URL url) {
       try {
         String swaggerContent = IOUtils.toString(url, StandardCharsets.UTF_8);
         OpenAPI result = internalParseSwagger(swaggerContent);
         validateSwagger(result);
         return result;
       } catch (Throwable e) {
         throw new ServiceCombException("Parse swagger from url failed, url=" + 
url, e);
       }
     }
   ```
   解析出来的OpenAPI对象里好多都是`null`。
   我尝试着把`swagger: "2.0"`的契约转换成`openapi: 3.0.1`依然会报错(https://editor.swagger.io/)。


-- 
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]

Reply via email to