apache / apache/servicecomb-java-chassis

同一个微服务不同shema文件的模型是否可以互相引用

Open
#3,259 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
814
Avg merge
8d 23h
Merged PRs (30d)
1

Description

1、在schema schema-a 文件中定义如下模型
```
GpcsRet:
type: "object"
properties:
code:
type: "integer"
description: "返回码"
msg:
type: "string"
description: "返回描述"
```

2、是否可以在schema B 文件中如下引用
```
CommonRsp:
type: "object"
properties:
ret:
$ref: "schema-a.yaml#/definitions/GpcsRet"
````

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating how schema-a.yaml and schema B are loaded and how the $ref to definitions/GpcsRet is resolved. Trace the GpcsRet and CommonRsp definitions and check whether the project has an existing validation or schema-loading test for cross-file references. Done means documenting a supported or unsupported answer and any required constraints.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.