cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/pkgname.txtar (about)

     1  #pkgName: somepkg
     2  -- schema.json --
     3  {
     4      "$schema": "https://json-schema.org/draft/2019-09/schema",
     5      "type": "object",
     6      "title": "Main schema",
     7      "description": "Specify who you are and all.",
     8      "$defs": {
     9          "phone number": {
    10              "description": "a telephone number",
    11              "type": "string"
    12          }
    13      },
    14      "properties": {
    15          "person": {
    16              "description": "A person is a human being.",
    17              "type": "object"
    18          }
    19      }
    20  }
    21  -- out/decode/extract --
    22  // Main schema
    23  //
    24  // Specify who you are and all.
    25  package somepkg
    26  
    27  @jsonschema(schema="https://json-schema.org/draft/2019-09/schema")
    28  
    29  // A person is a human being.
    30  person?: {
    31  	...
    32  }
    33  
    34  // a telephone number
    35  #: "phone number": string
    36  ...