github.com/jbking/gohan@v0.0.0-20151217002006-b41ccf1c2a96/etc/schema/gohan.json (about)

     1  {
     2      "policies": [
     3          {
     4              "action": "*",
     5              "effect": "allow",
     6              "id": "admin_statement",
     7              "principal": "admin",
     8              "resource": {
     9                  "path": ".*"
    10              }
    11          }
    12      ],
    13      "schemas": [
    14          {
    15              "description": "The main metaschema",
    16              "id": "schema",
    17              "metadata": {
    18                  "type": "metaschema"
    19              },
    20              "plural": "schemas",
    21              "prefix": "/gohan/v0.1",
    22              "schema": {
    23                  "additionalProperties": false,
    24                  "properties": {
    25                      "description": {
    26                          "default": "",
    27                          "description": "Description",
    28                          "permission": [
    29                              "create",
    30                              "update"
    31                          ],
    32                          "title": "Description",
    33                          "type": "string"
    34                      },
    35                      "id": {
    36                          "description": "Schema ID",
    37                          "permission": [
    38                              "create"
    39                          ],
    40                          "title": "ID",
    41                          "type": "string",
    42                          "unique": true
    43                      },
    44                      "metadata": {
    45                          "default": {},
    46                          "description": "metadata for application developer",
    47                          "format": "yaml",
    48                          "permission": [
    49                              "create",
    50                              "update"
    51                          ],
    52                          "title": "Metadata",
    53                          "type": "object"
    54                      },
    55                      "namespace": {
    56                          "default": "",
    57                          "description": "Namespace the schema belongs to",
    58                          "permission": [
    59                              "create"
    60                          ],
    61                          "title": "Namespace",
    62                          "type": "string"
    63                      },
    64                      "parent": {
    65                          "default": "",
    66                          "description": "Parent of this schema",
    67                          "permission": [
    68                              "create",
    69                              "update"
    70                          ],
    71                          "title": "Parent",
    72                          "type": "string"
    73                      },
    74                      "plural": {
    75                          "description": "Plural of this schema",
    76                          "permission": [
    77                              "create",
    78                              "update"
    79                          ],
    80                          "title": "Plural",
    81                          "type": "string"
    82                      },
    83                      "prefix": {
    84                          "default": "",
    85                          "description": "prefix",
    86                          "permission": [
    87                              "create",
    88                              "update"
    89                          ],
    90                          "title": "Prefix",
    91                          "type": "string"
    92                      },
    93                      "schema": {
    94                          "default": {
    95                              "properties": {
    96                                  "id": {
    97                                      "permission": [
    98                                          "create"
    99                                      ],
   100                                      "type": "string"
   101                                  }
   102                              },
   103                              "type": "object"
   104                          },
   105                          "description": "The inner metaschema",
   106                          "detail_view": true,
   107                          "permission": [
   108                              "create",
   109                              "update"
   110                          ],
   111                          "properties": {
   112                              "additionalProperties": {
   113                                  "type": "boolean"
   114                              },
   115                              "properties": {
   116                                  "patternProperties": {
   117                                      "^.*$": {
   118                                          "additionalProperties": false,
   119                                          "properties": {
   120                                              "additionalProperties": {
   121                                                  "title": "Additional properties",
   122                                                  "type": "boolean"
   123                                              },
   124                                              "default": {
   125                                                  "anyOf": [
   126                                                      {
   127                                                          "type": "array"
   128                                                      },
   129                                                      {
   130                                                          "type": "boolean"
   131                                                      },
   132                                                      {
   133                                                          "type": "integer"
   134                                                      },
   135                                                      {
   136                                                          "type": "number"
   137                                                      },
   138                                                      {
   139                                                          "type": "object"
   140                                                      },
   141                                                      {
   142                                                          "type": "string"
   143                                                      }
   144                                                  ],
   145                                                  "title": "Default"
   146                                              },
   147                                              "description": {
   148                                                  "title": "Description",
   149                                                  "type": "string"
   150                                              },
   151                                              "detail_view": {
   152                                                  "title": "Detail View Only",
   153                                                  "type": "boolean"
   154                                              },
   155                                              "enum": {
   156                                                  "minItems": 1,
   157                                                  "title": "Enum",
   158                                                  "type": "array",
   159                                                  "uniqueItems": true
   160                                              },
   161                                              "format": {
   162                                                  "title": "format",
   163                                                  "type": "string"
   164                                              },
   165                                              "id": {
   166                                                  "title": "ID",
   167                                                  "type": "string"
   168                                              },
   169                                              "items": {
   170                                                  "format": "yaml",
   171                                                  "title": "Items",
   172                                                  "type": "object"
   173                                              },
   174                                              "pattern": {
   175                                                  "format": "regex",
   176                                                  "title": "Pattern",
   177                                                  "type": "string"
   178                                              },
   179                                              "permission": {
   180                                                  "items": {
   181                                                      "enum": [
   182                                                          "create",
   183                                                          "update"
   184                                                      ],
   185                                                      "type": "string"
   186                                                  },
   187                                                  "title": "Permission",
   188                                                  "type": "array"
   189                                              },
   190                                              "properties": {
   191                                                  "format": "yaml",
   192                                                  "title": "Properties",
   193                                                  "type": "object"
   194                                              },
   195                                              "patternProperties": {
   196                                                  "format": "yaml",
   197                                                  "title": "Pattern Properties",
   198                                                  "type": "object"
   199                                              },
   200                                              "additionalProperties": {
   201                                                  "title": "Additional properties",
   202                                                  "type": "boolean"
   203                                              },
   204                                              "relation": {
   205                                                  "title": "Relation",
   206                                                  "type": "string"
   207                                              },
   208                                              "relation_property": {
   209                                                  "title": "Relation Property",
   210                                                  "type": "string"
   211                                              },
   212                                              "required": {
   213                                                  "items": {
   214                                                      "type": "string"
   215                                                  },
   216                                                  "title": "Required fields",
   217                                                  "type": "array",
   218                                                  "uniqueItems": true
   219                                              },
   220                                              "sql": {
   221                                                  "title": "SQL type",
   222                                                  "type": "string"
   223                                              },
   224                                              "title": {
   225                                                  "title": "Title",
   226                                                  "type": "string"
   227                                              },
   228                                              "type": {
   229                                                  "oneOf": [
   230                                                      {
   231                                                          "enum": [
   232                                                              "array",
   233                                                              "boolean",
   234                                                              "integer",
   235                                                              "null",
   236                                                              "number",
   237                                                              "object",
   238                                                              "string"
   239                                                          ],
   240                                                          "title": "Type",
   241                                                          "type": "string"
   242                                                      },
   243                                                      {
   244                                                          "items": {
   245                                                              "enum": [
   246                                                                  "array",
   247                                                                  "boolean",
   248                                                                  "integer",
   249                                                                  "null",
   250                                                                  "number",
   251                                                                  "object",
   252                                                                  "string"
   253                                                              ]
   254                                                          },
   255                                                          "title": "Type",
   256                                                          "type": "array",
   257                                                          "uniqueItems": true
   258                                                      }
   259                                                  ]
   260                                              },
   261                                              "unique": {
   262                                                  "title": "Unique",
   263                                                  "type": "boolean"
   264                                              },
   265                                              "uniqueItems": {
   266                                                  "title": "Unique items",
   267                                                  "type": "boolean"
   268                                              },
   269                                              "view": {
   270                                                  "title": "view configuraion on UI",
   271                                                  "type": "array"
   272                                              }
   273                                          },
   274                                          "propertiesOrder": [
   275                                              "id",
   276                                              "title",
   277                                              "type",
   278                                              "format",
   279                                              "default",
   280                                              "permission",
   281                                              "unique",
   282                                              "properties",
   283                                              "patternProperties",
   284                                              "items",
   285                                              "uniqueItems",
   286                                              "pattern",
   287                                              "enum",
   288                                              "relation",
   289                                              "detail_view",
   290                                              "sql",
   291                                              "required"
   292                                          ],
   293                                          "required": [
   294                                              "description",
   295                                              "type",
   296                                              "title"
   297                                          ],
   298                                          "type": "object"
   299                                      }
   300                                  },
   301                                  "title": "Properties",
   302                                  "type": "object"
   303                              },
   304                              "propertiesOrder": {
   305                                  "items": {
   306                                      "type": "string"
   307                                  },
   308                                  "title": "Properties Order",
   309                                  "type": "array",
   310                                  "items": {
   311                                      "type": "string"
   312                                  },
   313                                  "uniqueItems": true
   314                              },
   315                              "required": {
   316                                  "items": {
   317                                      "type": "string"
   318                                  },
   319                                  "title": "Required properties",
   320                                  "type": "array",
   321                                  "items": {
   322                                      "type": "string"
   323                                  },
   324                                  "uniqueItems": true
   325                              },
   326                              "type": {
   327                                  "title": "Type",
   328                                  "type": "string"
   329                              }
   330                          },
   331                          "title": "JSON schema",
   332                          "type": "object"
   333                      },
   334                      "singular": {
   335                          "description": "Singular name of this schema",
   336                          "permission": [
   337                              "create",
   338                              "update"
   339                          ],
   340                          "title": "Singular",
   341                          "type": "string"
   342                      },
   343                      "title": {
   344                          "description": "Label of this schema",
   345                          "permission": [
   346                              "create",
   347                              "update"
   348                          ],
   349                          "title": "Title",
   350                          "type": "string"
   351                      },
   352                      "actions": {
   353                          "default": {},
   354                          "description": "Resource actions",
   355                          "permission": [
   356                              "create",
   357                              "update"
   358                          ],
   359                          "patternProperties": {
   360                              ".*": {
   361                                  "properties": {
   362                                      "input": {
   363                                          "type": "object"
   364                                      },
   365                                      "output": {
   366                                          "type": "object"
   367                                      }
   368                                  },
   369                                  "type": "object"
   370                              }
   371                          },
   372                          "title": "Actions",
   373                          "type": ["object", "null"]
   374                      }
   375                  },
   376                  "propertiesOrder": [
   377                      "id",
   378                      "singular",
   379                      "plural",
   380                      "title",
   381                      "prefix",
   382                      "schema",
   383                      "description",
   384                      "parent",
   385                      "namespace",
   386                      "metadata",
   387                      "actions"
   388                  ],
   389                  "required": [
   390                      "id",
   391                      "singular",
   392                      "plural",
   393                      "schema",
   394                      "title"
   395                  ],
   396                  "title": "Schema Definition",
   397                  "type": "object"
   398              },
   399              "singular": "schema",
   400              "title": "Gohan Schema"
   401          },
   402          {
   403              "description": "The policy metaschema",
   404              "id": "policy",
   405              "metadata": {
   406                  "type": "metaschema"
   407              },
   408              "plural": "policies",
   409              "prefix": "/gohan/v0.1",
   410              "schema": {
   411                  "properties": {
   412                      "action": {
   413                          "description": "action",
   414                          "permission": [
   415                              "create",
   416                              "update"
   417                          ],
   418                          "title": "Action",
   419                          "type": "string"
   420                      },
   421                      "condition": {
   422                          "default": [],
   423                          "description": "condition",
   424                          "items": {
   425                              "type": "string"
   426                          },
   427                          "permission": [
   428                              "create",
   429                              "update"
   430                          ],
   431                          "title": "Condition",
   432                          "type": "array"
   433                      },
   434                      "effect": {
   435                          "description": "effect",
   436                          "enum": [
   437                              "allow",
   438                              "deny"
   439                          ],
   440                          "permission": [
   441                              "create",
   442                              "update"
   443                          ],
   444                          "title": "Effect",
   445                          "type": "string"
   446                      },
   447                      "id": {
   448                          "description": "id",
   449                          "permission": [
   450                              "create"
   451                          ],
   452                          "title": "ID",
   453                          "type": "string"
   454                      },
   455                      "principal": {
   456                          "description": "principal",
   457                          "permission": [
   458                              "create",
   459                              "update"
   460                          ],
   461                          "title": "Principal",
   462                          "type": "string"
   463                      },
   464                      "resource": {
   465                          "description": "resource",
   466                          "permission": [
   467                              "create",
   468                              "update"
   469                          ],
   470                          "properties": {
   471                              "path": {
   472                                  "title": "Path",
   473                                  "type": "string"
   474                              },
   475                              "properties": {
   476                                  "items": {
   477                                      "type": "string"
   478                                  },
   479                                  "title": "Properties",
   480                                  "type": "array"
   481                              }
   482                          },
   483                          "title": "Resource",
   484                          "type": "object"
   485                      }
   486                  },
   487                  "propertiesOrder": [
   488                      "id",
   489                      "principal",
   490                      "resource",
   491                      "action",
   492                      "effect",
   493                      "condition"
   494                  ],
   495                  "type": "object"
   496              },
   497              "singular": "policy",
   498              "title": "Gohan Policy"
   499          },
   500          {
   501              "description": "The extension metaschema",
   502              "id": "extension",
   503              "metadata": {
   504                  "type": "metaschema"
   505              },
   506              "plural": "extensions",
   507              "prefix": "/gohan/v0.1",
   508              "schema": {
   509                  "properties": {
   510                      "code": {
   511                          "default": "",
   512                          "description": "code",
   513                          "format": "javascript",
   514                          "permission": [
   515                              "create",
   516                              "update"
   517                          ],
   518                          "title": "Code",
   519                          "type": "string"
   520                      },
   521                      "code_type": {
   522                          "default": "javascript",
   523                          "description": "code type",
   524                          "permission": [
   525                              "create",
   526                              "update"
   527                          ],
   528                          "title": "Code Type",
   529                          "type": "string"
   530                      },
   531                      "id": {
   532                          "description": "id",
   533                          "permission": [
   534                              "create"
   535                          ],
   536                          "title": "ID",
   537                          "type": "string"
   538                      },
   539                      "path": {
   540                          "description": "path",
   541                          "permission": [
   542                              "create",
   543                              "update"
   544                          ],
   545                          "title": "Path",
   546                          "type": "string"
   547                      },
   548                      "url": {
   549                          "default": "",
   550                          "description": "URL",
   551                          "format": "url",
   552                          "permission": [
   553                              "create",
   554                              "update"
   555                          ],
   556                          "title": "URL",
   557                          "type": "string"
   558                      }
   559                  },
   560                  "propertiesOrder": [
   561                      "id",
   562                      "code_type",
   563                      "url",
   564                      "path",
   565                      "code"
   566                  ],
   567                  "type": "object"
   568              },
   569              "singular": "extension",
   570              "title": "Gohan Extension"
   571          },
   572          {
   573              "description": "The event metaschema",
   574              "id": "event",
   575              "metadata": {
   576                  "nosync": true,
   577                  "type": "metaschema"
   578              },
   579              "plural": "events",
   580              "prefix": "/gohan/v0.1",
   581              "schema": {
   582                  "properties": {
   583                      "body": {
   584                          "description": "body",
   585                          "format": "yaml",
   586                          "permission": [
   587                              "create",
   588                              "update"
   589                          ],
   590                          "title": "Event body",
   591                          "type": "object"
   592                      },
   593                      "version": {
   594                          "description": "The version of the config this event created",
   595                          "permission": [
   596                              "create",
   597                              "update"
   598                          ],
   599                          "title": "Config version",
   600                          "type": "integer"
   601                      },
   602                      "id": {
   603                          "description": "id",
   604                          "permission": [
   605                              "create"
   606                          ],
   607                          "sql": "integer primary key auto_increment ",
   608                          "title": "ID",
   609                          "type": "integer"
   610                      },
   611                      "path": {
   612                          "default": "",
   613                          "description": "Event path",
   614                          "permission": [
   615                              "create",
   616                              "update"
   617                          ],
   618                          "title": "Path",
   619                          "type": "string"
   620                      },
   621                      "timestamp": {
   622                          "default": "",
   623                          "description": "Event timestamp (unixtime)",
   624                          "permission": [
   625                              "create",
   626                              "update"
   627                          ],
   628                          "title": "Timestamp",
   629                          "type": "integer"
   630                      },
   631                      "type": {
   632                          "default": "",
   633                          "description": "Event type",
   634                          "permission": [
   635                              "create",
   636                              "update"
   637                          ],
   638                          "title": "Type",
   639                          "type": "string"
   640                      }
   641                  },
   642                  "propertiesOrder": [
   643                      "id",
   644                      "type",
   645                      "path",
   646                      "timestamp",
   647                      "version",
   648                      "body"
   649                  ],
   650                  "type": "object"
   651              },
   652              "singular": "event",
   653              "title": "Gohan Event Log"
   654          },
   655          {
   656              "description": "The namespace schema",
   657              "id": "namespace",
   658              "plural": "namespaces",
   659              "prefix": "/gohan/v0.1",
   660              "metadata": {
   661                  "nosync": true,
   662                  "type": "metaschema"
   663              },
   664              "schema": {
   665                  "properties": {
   666                      "description": {
   667                          "default": "",
   668                          "description": "description",
   669                          "permission": [
   670                              "create",
   671                              "update"
   672                          ],
   673                          "title": "Description",
   674                          "type": "string"
   675                      },
   676                      "id": {
   677                          "description": "id",
   678                          "permission": [
   679                              "create"
   680                          ],
   681                          "title": "ID",
   682                          "type": "string"
   683                      },
   684                      "metadata": {
   685                          "default": {},
   686                          "description": "metadata",
   687                          "format": "yaml",
   688                          "permission": [
   689                              "create",
   690                              "update"
   691                          ],
   692                          "title": "Metadata",
   693                          "type": "object"
   694                      },
   695                      "name": {
   696                          "default": "",
   697                          "description": "name",
   698                          "permission": [
   699                              "create",
   700                              "update"
   701                          ],
   702                          "title": "Name",
   703                          "type": "string"
   704                      },
   705                      "parent": {
   706                          "default": "",
   707                          "description": "Parent of this namespace",
   708                          "permission": [
   709                              "create"
   710                          ],
   711                          "title": "parent",
   712                          "type": "string"
   713                      },
   714                      "prefix": {
   715                          "default": "",
   716                          "description": "prefix",
   717                          "permission": [
   718                              "create"
   719                          ],
   720                          "title": "prefix",
   721                          "type": "string"
   722                      },
   723                      "version": {
   724                          "default": "",
   725                          "description": "version",
   726                          "permission": [
   727                              "create",
   728                              "update"
   729                          ],
   730                          "title": "Version",
   731                          "type": "string"
   732                      }
   733                  },
   734                  "propertiesOrder": [
   735                      "id",
   736                      "name",
   737                      "description",
   738                      "prefix",
   739                      "parent",
   740                      "version",
   741                      "metadata"
   742                  ],
   743                  "type": "object"
   744              },
   745              "singular": "namespace",
   746              "title": "Gohan Namespace"
   747          }
   748      ]
   749  }