json schema? #3

Open
opened 2025-10-28 06:44:00 +08:00 by sam · 2 comments
Owner

便于为大语言模型生成数据提供接口

  • 带默认值的类型自动推断
  • params = properties, desc = description
便于为大语言模型生成数据提供接口 - [ ] 带默认值的类型自动推断 - [ ] params = properties, desc = description
sam added this to the dev project 2025-10-28 06:44:00 +08:00
Author
Owner
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "default": "Anonymous"
    },
    "age": {
      "type": "integer",
      "minimum": 0,
      "default": 18
    }
  }
}
``` { "type": "object", "properties": { "name": { "type": "string", "default": "Anonymous" }, "age": { "type": "integer", "minimum": 0, "default": 18 } } } ```
Author
Owner
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Person",
  "description": "Schema for a person object",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The person's full name"
    },
    "age": {
      "type": "integer",
      "description": "The person's age in years",
      "minimum": 0
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "The person's email address"
    },
    "isStudent": {
      "type": "boolean",
      "description": "Whether the person is currently a student"
    }
  },
  "required": ["name", "age"]
}
``` { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Person", "description": "Schema for a person object", "type": "object", "properties": { "name": { "type": "string", "description": "The person's full name" }, "age": { "type": "integer", "description": "The person's age in years", "minimum": 0 }, "email": { "type": "string", "format": "email", "description": "The person's email address" }, "isStudent": { "type": "boolean", "description": "Whether the person is currently a student" } }, "required": ["name", "age"] } ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/modyml#3
No description provided.