Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] 不支持JSON SCHEMA $ref的引用语义吗 #4133

Closed
1 task
leslie-fei opened this issue Apr 12, 2024 · 0 comments
Closed
1 task

[Feature Request] 不支持JSON SCHEMA $ref的引用语义吗 #4133

leslie-fei opened this issue Apr 12, 2024 · 0 comments

Comments

@leslie-fei
Copy link

leslie-fei commented Apr 12, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

页面没法渲染

{
  type: 'object',
  properties: {
    "$defs": {
      "name": {
        type: 'string',
        title: 'Input',
        'x-decorator': 'FormItem',
        'x-component': 'Input'
      }
    },
    input: {
      '$ref': '#/$defs/name'
    }
  },
}

What does the proposed API look like?

JSON-SCHEMA片段 https://json-schema.org/understanding-json-schema/structuring#defs

{
  "$id": "https://example.com/schemas/customer",

  "type": "object",
  "properties": {
    "first_name": { "$ref": "#/$defs/name" },
    "last_name": { "$ref": "#/$defs/name" },
    "shipping_address": { "$ref": "/schemas/address" },
    "billing_address": { "$ref": "/schemas/address" }
  },
  "required": ["first_name", "last_name", "shipping_address", "billing_address"],

  "$defs": {
    "name": { "type": "string" }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant