alexd73

Нода с примерами полей

Oct 3rd, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 19.00 KB | None | 0 0
  1. "node--node_example":{
  2.    "title":"node:node_example Schema",
  3.    "description":"Describes the payload for 'node' entities of the 'node_example' bundle.",
  4.    "type":"object",
  5.    "required":[
  6.       "data"
  7.    ],
  8.    "properties":{
  9.       "data":{
  10.          "description":"\"Resource objects\" appear in a JSON:API document to represent resources.",
  11.          "type":"object",
  12.          "required":[
  13.             "type",
  14.             "id"
  15.          ],
  16.          "properties":{
  17.             "type":{
  18.                "type":"string",
  19.                "title":"type",
  20.                "description":"Тип ресурса",
  21.                "enum":[
  22.                   "node--node_example"
  23.                ]
  24.             },
  25.             "id":{
  26.                "type":"string",
  27.                "title":"Resource ID",
  28.                "format":"uuid",
  29.                "maxLength":128
  30.             },
  31.             "attributes":{
  32.                "description":"Entity attributes",
  33.                "type":"object",
  34.                "additionalProperties":false,
  35.                "properties":{
  36.                   "drupal_internal__nid":{
  37.                      "type":"integer",
  38.                      "title":"ID"
  39.                   },
  40.                   "drupal_internal__vid":{
  41.                      "type":"integer",
  42.                      "title":"ID редакции"
  43.                   },
  44.                   "langcode":{
  45.                      "type":"object",
  46.                      "properties":{
  47.                         "value":{
  48.                            "type":"string",
  49.                            "title":"Код языка"
  50.                         },
  51.                         "language":{
  52.                            "type":"language_reference",
  53.                            "title":"Объект языка",
  54.                            "description":"Язык ссылки"
  55.                         }
  56.                      },
  57.                      "required":[
  58.                         "value"
  59.                      ],
  60.                      "title":"Язык"
  61.                   },
  62.                   "status":{
  63.                      "type":"boolean",
  64.                      "title":"Опубликовано",
  65.                      "default":true
  66.                   },
  67.                   "title":{
  68.                      "type":"string",
  69.                      "title":"Заголовок",
  70.                      "maxLength":255
  71.                   },
  72.                   "created":{
  73.                      "type":"number",
  74.                      "title":"Время создания",
  75.                      "format":"utc-millisec",
  76.                      "description":"Время создания материала."
  77.                   },
  78.                   "changed":{
  79.                      "type":"number",
  80.                      "title":"Изменение",
  81.                      "format":"utc-millisec",
  82.                      "description":"Время последнего редактирования материала."
  83.                   },
  84.                   "promote":{
  85.                      "type":"boolean",
  86.                      "title":"Помещено на главную страницу",
  87.                      "default":true
  88.                   },
  89.                   "sticky":{
  90.                      "type":"boolean",
  91.                      "title":"Закреплять вверху списков",
  92.                      "default":false
  93.                   },
  94.                   "default_langcode":{
  95.                      "type":"boolean",
  96.                      "title":"Перевод по умолчанию",
  97.                      "description":"Флаг, указывающий, является ли этот перевод - переводом по умолчанию.",
  98.                      "default":true
  99.                   },
  100.                   "metatag":{
  101.                      "type":"object",
  102.                      "title":"Мета-теги",
  103.                      "description":"Мета-теги для сущности."
  104.                   },
  105.                   "metatag_normalized":{
  106.                      "type":"array",
  107.                      "title":"Metatags normalized",
  108.                      "description":"Мета-теги для сущности.",
  109.                      "items":{
  110.                         "type":"object",
  111.                         "properties":{
  112.                            "tag":{
  113.                               "type":"string",
  114.                               "title":"Тег"
  115.                            },
  116.                            "attributes":{
  117.                               "type":"any",
  118.                               "title":"Название"
  119.                            }
  120.                         },
  121.                         "required":[
  122.                            "tag",
  123.                            "attributes"
  124.                         ]
  125.                      },
  126.                      "minItems":1
  127.                   },
  128.                   "path":{
  129.                      "type":"object",
  130.                      "properties":{
  131.                         "alias":{
  132.                            "type":"string",
  133.                            "title":"Синоним пути"
  134.                         },
  135.                         "pid":{
  136.                            "type":"integer",
  137.                            "title":"ID пути"
  138.                         },
  139.                         "langcode":{
  140.                            "type":"string",
  141.                            "title":"Language Code"
  142.                         },
  143.                         "pathauto":{
  144.                            "type":"integer",
  145.                            "title":"Pathauto state",
  146.                            "description":"Whether an automated alias should be created or not."
  147.                         }
  148.                      },
  149.                      "required":[
  150.                         "pathauto"
  151.                      ],
  152.                      "title":"Синоним URL"
  153.                   },
  154.                   "body":{
  155.                      "type":"object",
  156.                      "properties":{
  157.                         "value":{
  158.                            "type":"string",
  159.                            "title":"Текст"
  160.                         },
  161.                         "format":{
  162.                            "type":"string",
  163.                            "title":"Текстовый формат"
  164.                         },
  165.                         "summary":{
  166.                            "type":"string",
  167.                            "title":"Сводка"
  168.                         }
  169.                      },
  170.                      "required":[
  171.                         "value"
  172.                      ],
  173.                      "title":"Текст (форматированный, длинный, с резюме)"
  174.                   },
  175.                   "boolean":{
  176.                      "type":"boolean",
  177.                      "title":"Boolean",
  178.                      "default":false
  179.                   },
  180.                   "integer":{
  181.                      "type":"integer",
  182.                      "title":"Число целое"
  183.                   },
  184.                   "link":{
  185.                      "type":"object",
  186.                      "properties":{
  187.                         "uri":{
  188.                            "type":"uri",
  189.                            "title":"URI"
  190.                         },
  191.                         "title":{
  192.                            "type":"string",
  193.                            "title":"Текст ссылки"
  194.                         }
  195.                      },
  196.                      "title":"Ссылка в веб",
  197.                      "description":"Текст ссылки может быть отключен"
  198.                   },
  199.                   "simple_text":{
  200.                      "type":"string",
  201.                      "title":"Текст простой",
  202.                      "maxLength":255
  203.                   },
  204.                   "subtitle":{
  205.                      "type":"object",
  206.                      "properties":{
  207.                         "value":{
  208.                            "type":"string",
  209.                            "title":"Текст",
  210.                            "maxLength":255
  211.                         },
  212.                         "format":{
  213.                            "type":"string",
  214.                            "title":"Текстовый формат"
  215.                         }
  216.                      },
  217.                      "required":[
  218.                         "value"
  219.                      ],
  220.                      "title":"Текст форматированный, без анонса"
  221.                   },
  222.                   "telephone":{
  223.                      "type":"string",
  224.                      "title":"Номер телефона"
  225.                   }
  226.                },
  227.                "required":[
  228.                   "title",
  229.                   "metatag",
  230.                   "metatag_normalized",
  231.                   "path"
  232.                ]
  233.             },
  234.             "relationships":{
  235.                "description":"Entity relationships",
  236.                "type":"object",
  237.                "additionalProperties":false,
  238.                "properties":{
  239.                   "node_type":{
  240.                      "type":"object",
  241.                      "properties":{
  242.                         "data":{
  243.                            "type":"object",
  244.                            "required":[
  245.                               "type",
  246.                               "id"
  247.                            ],
  248.                            "properties":{
  249.                               "type":{
  250.                                  "type":"string",
  251.                                  "title":"Referenced resource",
  252.                                  "enum":[
  253.                                     "node_type--node_type"
  254.                                  ]
  255.                               },
  256.                               "id":{
  257.                                  "type":"string",
  258.                                  "title":"Resource ID",
  259.                                  "format":"uuid",
  260.                                  "maxLength":128
  261.                               }
  262.                            }
  263.                         }
  264.                      },
  265.                      "title":"Тип материала"
  266.                   },
  267.                   "uid":{
  268.                      "type":"object",
  269.                      "properties":{
  270.                         "data":{
  271.                            "type":"object",
  272.                            "required":[
  273.                               "type",
  274.                               "id"
  275.                            ],
  276.                            "properties":{
  277.                               "type":{
  278.                                  "type":"string",
  279.                                  "title":"Referenced resource",
  280.                                  "enum":[
  281.                                     "user--user"
  282.                                  ]
  283.                               },
  284.                               "id":{
  285.                                  "type":"string",
  286.                                  "title":"Resource ID",
  287.                                  "format":"uuid",
  288.                                  "maxLength":128
  289.                               }
  290.                            }
  291.                         }
  292.                      },
  293.                      "title":"Автор"
  294.                   },
  295.                   "file":{
  296.                      "type":"object",
  297.                      "properties":{
  298.                         "data":{
  299.                            "type":"array",
  300.                            "items":{
  301.                               "type":"object",
  302.                               "required":[
  303.                                  "type",
  304.                                  "id"
  305.                               ],
  306.                               "properties":{
  307.                                  "type":{
  308.                                     "type":"string",
  309.                                     "title":"Referenced resource",
  310.                                     "enum":[
  311.                                        "file--file"
  312.                                     ]
  313.                                  },
  314.                                  "id":{
  315.                                     "type":"string",
  316.                                     "title":"Resource ID",
  317.                                     "format":"uuid",
  318.                                     "maxLength":128
  319.                                  }
  320.                               }
  321.                            }
  322.                         }
  323.                      },
  324.                      "title":"Обычный файл (вложение)"
  325.                   },
  326.                   "image":{
  327.                      "type":"object",
  328.                      "properties":{
  329.                         "data":{
  330.                            "type":"object",
  331.                            "required":[
  332.                               "type",
  333.                               "id"
  334.                            ],
  335.                            "properties":{
  336.                               "type":{
  337.                                  "type":"string",
  338.                                  "title":"Referenced resource",
  339.                                  "enum":[
  340.                                     "file--file"
  341.                                  ]
  342.                               },
  343.                               "id":{
  344.                                  "type":"string",
  345.                                  "title":"Resource ID",
  346.                                  "format":"uuid",
  347.                                  "maxLength":128
  348.                               }
  349.                            }
  350.                         }
  351.                      },
  352.                      "title":"Изображение"
  353.                   },
  354.                   "sections":{
  355.                      "type":"object",
  356.                      "properties":{
  357.                         "data":{
  358.                            "type":"array",
  359.                            "items":{
  360.                               "type":"object",
  361.                               "required":[
  362.                                  "type",
  363.                                  "id"
  364.                               ],
  365.                               "properties":{
  366.                                  "type":{
  367.                                     "type":"string",
  368.                                     "title":"Referenced resource"
  369.                                  },
  370.                                  "id":{
  371.                                     "type":"string",
  372.                                     "title":"Resource ID",
  373.                                     "format":"uuid",
  374.                                     "maxLength":128
  375.                                  }
  376.                               }
  377.                            }
  378.                         }
  379.                      },
  380.                      "title":"Секции (Ссылка на сущность Параграф)"
  381.                   },
  382.                   "tags":{
  383.                      "type":"object",
  384.                      "properties":{
  385.                         "data":{
  386.                            "type":"object",
  387.                            "required":[
  388.                               "type",
  389.                               "id"
  390.                            ],
  391.                            "properties":{
  392.                               "type":{
  393.                                  "type":"string",
  394.                                  "title":"Referenced resource",
  395.                                  "enum":[
  396.                                     "taxonomy_term--tags"
  397.                                  ]
  398.                               },
  399.                               "id":{
  400.                                  "type":"string",
  401.                                  "title":"Resource ID",
  402.                                  "format":"uuid",
  403.                                  "maxLength":128
  404.                               }
  405.                            }
  406.                         }
  407.                      },
  408.                      "title":"Теги (ссылка на таксономию)"
  409.                   }
  410.                },
  411.                "required":[
  412.  
  413.                ]
  414.             },
  415.             "links":{
  416.                "type":"object",
  417.                "additionalProperties":{
  418.                   "description":"A link **MUST** be represented as either: a string containing the link's URL or a link object . ",
  419.                   "type":"object",
  420.                   "required":[
  421.                      "href"
  422.                   ],
  423.                   "properties":{
  424.                      "href":{
  425.                         "description":"A string containing the link's URL . ",
  426.                         "type":"string",
  427.                         "format":"uri - reference"
  428.                      },
  429.                      "meta":{
  430.                         "description":"Non-standard meta-information that can not be represented as an attribute or relationship.",
  431.                         "type":"object",
  432.                         "additionalProperties":true
  433.                      }
  434.                   }
  435.                }
  436.             },
  437.             "meta":{
  438.                "description":"Non-standard meta-information that can not be represented as an attribute or relationship.",
  439.                "type":"object",
  440.                "additionalProperties":true
  441.             }
  442.          },
  443.          "additionalProperties":false
  444.       },
  445.       "meta":{
  446.          "description":"Non-standard meta-information that can not be represented as an attribute or relationship.",
  447.          "type":"object",
  448.          "additionalProperties":true
  449.       },
  450.       "links":{
  451.          "type":"object",
  452.          "additionalProperties":{
  453.             "description":"A link **MUST** be represented as either: a string containing the link's URL or a link object . ",
  454.             "type":"object",
  455.             "required":[
  456.                "href"
  457.             ],
  458.             "properties":{
  459.                "href":{
  460.                   "description":"A string containing the link's URL . ",
  461.                   "type":"string",
  462.                   "format":"uri - reference"
  463.                },
  464.                "meta":{
  465.                   "description":"Non-standard meta-information that can not be represented as an attribute or relationship.",
  466.                   "type":"object",
  467.                   "additionalProperties":true
  468.                }
  469.             }
  470.          }
  471.       },
  472.       "jsonapi":{
  473.          "description":"An object describing the server's implementation",
  474.          "type":"object",
  475.          "properties":{
  476.             "version":{
  477.                "type":"string"
  478.             },
  479.             "meta":{
  480.                "description":"Non-standard meta-information that can not be represented as an attribute or relationship.",
  481.                "type":"object",
  482.                "additionalProperties":true
  483.             }
  484.          },
  485.          "additionalProperties":false
  486.       }
  487.    },
  488.    "additionalProperties":true
  489. }
Add Comment
Please, Sign In to add comment