Skip to content

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

@beijixing511

Description

@beijixing511

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions