Skip to content

Instantly share code, notes, and snippets.

@Steven24K
Last active May 11, 2020 09:41
Show Gist options
  • Save Steven24K/9e32e890c75126e2bb5c0767d360c696 to your computer and use it in GitHub Desktop.
Save Steven24K/9e32e890c75126e2bb5c0767d360c696 to your computer and use it in GitHub Desktop.
{
"description": "The array of models of the application.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"name",
"attributes",
"permissions"
],
"properties": {
"name": {
"type": "string",
"pattern": "^[1-9a-zA-Z][0-9a-zA-Z]*$"
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"type": {
"enum": [
"null",
"union",
"title",
"string",
"int",
"int?",
"long",
"long?",
"double",
"double?",
"time",
"date",
"date_time",
"email",
"url",
"tel",
"image",
"file",
"bool",
"bool?",
"text",
"rich_text",
"blob",
"azure_image"
]
},
"name": {
"type": "string"
},
"cases": {
"type": "array",
"items": {
"type": "string"
}
},
"dbname": {
"type": "string"
},
"hidden_label": {
"type": "boolean"
},
"seeds": {
"type": "array",
"items": {
"type": "string"
}
},
"permissions": {
"type": "object",
"properties": {
"view": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"edit": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
},
"custom_rendering": {
"type": "string"
},
"index": {
"enum": [
"unique",
true
]
},
"max_image_width": {
"type": "number"
},
"aspect_ratio": {
"type": "number"
}
}
}
},
"permissions": {
"type": "object",
"required": [
"view",
"create",
"edit",
"delete"
],
"properties": {
"view": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"create": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"edit": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"delete": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"add": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
},
"searchable_by": {
"type": "array",
"items": {
"type": "object",
"required": [],
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"enum": [
"String",
"Boolean"
]
}
}
}
},
"type": {
"enum": [
"homepage",
"page",
"singleton",
"model"
]
},
"dbname": {
"type": "string"
},
"breadcrumb_attribute": {
"type": "string"
},
"side_menu_label": {
"type": "string"
},
"filter": {
"type": "string"
},
"order_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"attribute"
],
"properties": {
"attribute": {
"type": "string"
},
"direction": {
"enum": [
"asc",
"desc"
]
}
}
}
]
},
"order_by_relation": {
"type": "string"
},
"custom_rendering": {
"type": "string"
},
"headless_renderer": {
"type": "string"
},
"inherits": {
"type": "string"
},
"abstract": {
"type": "boolean"
},
"searchable_by_query": {
"type": "string"
},
"page_size": {
"type": "number",
"minimum": 0
},
"can_login": {
"type": "boolean"
},
"can_register": {
"type": "boolean"
},
"use_invite_flow": {
"type": "boolean"
},
"allow_multiple_sessions": {
"type": "boolean"
},
"permission_filters": {
"type": "object",
"properties": {
"view": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"edit": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"delete": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"create": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
}
},
"permission_tokens": {
"type": "object",
"properties": {
"view": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"edit": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"delete": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"create": {
"type": "array",
"items": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
}
},
"custom_restrictions": {
"type": "object",
"required": [
"view",
"create",
"edit",
"delete"
],
"properties": {
"view": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"create": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"edit": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"delete": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"add": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
},
"custom_edit_button_rendering": {
"type": "string"
},
"hide_from_main_menu": {
"type": "boolean"
},
"hide_menu": {
"type": "boolean"
},
"custom_menu_rendering": {
"type": "string"
},
"allow_maximisation": {
"type": "boolean"
},
"allow_fullscreen": {
"type": "boolean"
},
"hooks": {
"type": "object",
"properties": {
"before_create": {
"type": "string"
},
"after_create": {
"type": "string"
},
"before_edit": {
"type": "string"
},
"after_edit": {
"type": "string"
},
"before_delete": {
"type": "string"
},
"after_delete": {
"type": "string"
}
}
},
"presentation_structure": {
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"enum": [
"attribute"
]
},
"name": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"kind": {
"enum": [
"relation"
]
},
"name": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"kind": {
"enum": [
"group"
]
},
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"entries": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
]
},
"suppress_clickable_header": {
"type": "boolean"
},
"seeds": {
"type": "array"
},
"preloading": {
"type": "boolean"
},
"only_visible_to": {
"type": "array",
"items": {
"type": "string"
}
},
"custom_mails": {
"type": "object",
"properties": {
"register": {
"type": "object",
"properties": {
"subject": {
"type": "string"
},
"textContent": {
"type": "string"
},
"htmlContent": {
"type": "string"
}
}
},
"forgot_password": {
"type": "object",
"properties": {
"subject": {
"type": "string"
},
"textContent": {
"type": "string"
},
"htmlContent": {
"type": "string"
}
}
},
"change_email": {
"type": "object",
"properties": {
"subject": {
"type": "string"
},
"textContent": {
"type": "string"
},
"htmlContent": {
"type": "string"
}
}
}
}
},
"track_mutations": {
"type": "boolean"
},
"second_authentication": {
"type": "boolean"
},
"impersonated_by": {
"type": "string"
},
"impersonate": {
"type": "string"
}
}
}
}
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"models": {
"$ref": "https://gist.githubusercontent.com/Steven24K/9e32e890c75126e2bb5c0767d360c696/raw/ebe0d077ecef851b2bb219ee65e022fced528155/model-schema.json"
},
"relations": {
"$ref": "https://gist.githubusercontent.com/Steven24K/9e32e890c75126e2bb5c0767d360c696/raw/ebe0d077ecef851b2bb219ee65e022fced528155/relation-schema.json"
}
}
}
{
"description": "The array of relations of the application.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"source",
"target",
"sort"
],
"properties": {
"source": {
"type": "string"
},
"target": {
"type": "string"
},
"sort": {
"enum": [
"1-1",
"1-N",
"N-N"
]
},
"dbname": {
"type": "string"
},
"custom_rendering": {
"type": "object",
"required": [
"forward",
"inverted"
],
"properties": {
"forward": {
"type": "string"
},
"inverted": {
"type": "string"
}
}
},
"delete_behavior": {
"forward": {
"enum": [
"cascade",
"set_null"
]
},
"inverted": {
"enum": [
"cascade",
"set_null"
]
}
},
"style": {
"type": "object",
"properties": {
"menu": {
"enum": [
"title",
"title-secondary",
"none",
"always-open"
]
},
"items": {
"enum": [
"list",
"cards",
"inline",
"side-selector"
]
},
"always_maximised": {
"type": "boolean"
},
"allow_maximisation": {
"type": "boolean"
},
"allow_fullscreen": {
"type": "boolean"
},
"hide_title": {
"type": "boolean"
},
"add": {
"enum": [
"dropdown"
]
},
"always_show_title": {
"type": "boolean"
}
}
},
"style_inverted": {
"type": "object",
"properties": {
"menu": {
"enum": [
"title",
"title-secondary",
"none",
"always-open"
]
},
"items": {
"enum": [
"list",
"cards",
"inline",
"side-selector"
]
},
"always_maximised": {
"type": "boolean"
},
"allow_maximisation": {
"type": "boolean"
},
"allow_fullscreen": {
"type": "boolean"
},
"hide_title": {
"type": "boolean"
},
"add": {
"enum": [
"dropdown"
]
},
"always_show_title": {
"type": "boolean"
}
}
},
"filter": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"filter_inverted": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"hide": {
"type": "boolean"
},
"hide_inverted": {
"type": "boolean"
},
"permissions": {
"type": "object",
"required": [
"view",
"create",
"edit",
"delete"
],
"properties": {
"view": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"create": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"edit": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"delete": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"add": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"editable": {
"enum": [
"both",
"neither",
"source",
"target"
]
},
"create_permission_type": {
"enum": [
"view",
"edit",
"create"
]
}
}
},
"permissions_inverted": {
"type": "object",
"required": [
"view",
"create",
"edit",
"delete"
],
"properties": {
"view": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"create": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"edit": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"delete": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"add": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"editable": {
"enum": [
"both",
"neither",
"source",
"target"
]
},
"create_permission_type": {
"enum": [
"view",
"edit",
"create"
]
}
}
},
"permission_tokens": {
"type": "object",
"properties": {
"link": {
"type": "array",
"items": {
"type": "string"
}
},
"unlinke": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"max_source": {
"type": "number",
"minimum": 0
},
"max_target": {
"type": "number",
"minimum": 0
},
"relation_name": {
"type": "object",
"properties": {
"source_name": {
"type": "string"
},
"target_name": {
"type": "string"
}
}
},
"hooks": {
"type": "object",
"properties": {
"before_link": {
"type": "string"
},
"after_link": {
"type": "string"
},
"before_unlink": {
"type": "string"
},
"after_unlink": {
"type": "string"
}
}
},
"seeds": {
"type": "array"
},
"searchable_by_unlinked_target": {
"type": "boolean"
},
"maxRelationshipSeeds": {
"type": "number",
"minimum": 0
}
}
}
}
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"required": [
"namespace",
"context_name",
"dotnet_version",
"database_provider",
"api_version",
"url_prefix",
"models",
"relations",
"custom_view_imports",
"custom_restriction_imports"
],
"properties": {
"project_name": {
"type": "string",
"default": "MyProject",
"description": "The name of the project"
},
"namespace": {
"type": "string",
"default": "MyProject",
"description": "C# namespace in which all the application will be generated"
},
"context_name": {
"type": "string",
"default": "MyProjectContext",
"description": "Name of the database context. Used in migrations."
},
"dotnet_version": {
"default": "dotnet2",
"enum": [
"dotnet1",
"dotnet2",
"dotnet3"
],
"description": "ASP.NET Core version to use."
},
"database_provider": {
"default": "sqllite",
"enum": [
"sqlite",
"postgresql",
"mssql"
],
"description": "Chosen dbms."
},
"api_version": {
"default": "v1",
"type": "string",
"description": "Prefix of all api endpoints."
},
"url_prefix": {
"default": "/",
"type": "string",
"description": "Prefix for the route of generated controllers (in this example /admin)"
},
"custom_view_imports": {
"type": "string",
"description": "The import directive(s) to load custom renderers."
},
"custom_restriction_imports": {
"type": "string"
},
"models": {
"$ref": "https://gist.githubusercontent.com/Steven24K/9e32e890c75126e2bb5c0767d360c696/raw/b67d3976d9ebd6499b555d1014d22177d287e2c0/model-schema.json"
},
"relations": {
"$ref": "https://gist.githubusercontent.com/Steven24K/9e32e890c75126e2bb5c0767d360c696/raw/1073e795e7f51bad7cb148fc3d02d08086268452/relation-schema.json"
},
"portal": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"privacy_settings": {
"enum": [
"strict",
"standard"
]
}
}
},
"languages": {
"type": "array",
"items": {
"type": "string"
},
"description": "The languages supported by the application localisation. The values in the array are the allows values of the Languages property of the user models. The first language in the array will be the default language."
},
"skip_forced_id_increment": {
"type": "boolean",
"description": "If false or not specified, let the ORM take care of auto-incrementing ids."
},
"colors": {
"main_color": {
"type": "string"
},
"main_color_dark": {
"type": "string"
},
"main_color_light": {
"type": "string"
},
"background_color": {
"type": "string"
},
"border_color": {
"type": "string"
}
},
"public_site": {
"type": "object",
"properties": {
"data_provider": {
"enum": [
"drupal"
]
}
}
},
"project_repo": {
"type": "string"
},
"project_port": {
"type": "string"
},
"include": {
"type": "array",
"description": "A sub-specification file to be included as part of the current specification. Useful for partitioning large specifications."
},
"make_solution": {
"type": "boolean"
},
"client_keepalive_interval": {
"minimum": 0,
"type": "number",
"description": "The interval of the Keep Alive check on the client side in miliseconds."
},
"server_keepalive_intervall": {
"minimum": 0,
"type": "number",
"description": "The interval of the Keep Alive check on the server side in seconds."
},
"idle_session_timeout": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"enum": [
"none"
]
}
],
"description": "The time in minutes that a session of a authenticated user can be idle. After this time the session expires and the user must authenticate again."
},
"login_settings": {
"type": "object",
"properties": {
"block_timeout": {
"type": "number",
"description": "The time in second a user is unable to login after the maximum amount of incorrect login attempts are exceeded."
},
"max_attempts": {
"type": "number",
"description": "The maximum incorrect login attempts before the block kick in"
}
}
},
"generate_query_endpoint": {
"type": "boolean",
"description": "Opt-in for the query generator endpoint"
},
"generate_odata_endpoint": {
"type": "boolean",
"description": "Opt-in for the odata query generator endpoint"
},
"generate_cud_endpoint": {
"type": "boolean",
"description": "Opt-in for the CUD language query generator endpoint"
},
"generate_elasticsearch_query": {
"type": "boolean",
"description": "Opt-in for the elastic search query example"
},
"hot_reloadable": {
"type": "boolean",
"description": "Opt-in for getting packages and configuration for making your application hot reloadable, this option needs the skeleton-template"
},
"generate_integration_tests": {
"type": "boolean",
"description": "Opt-in for integration tests generation"
},
"second_authentication": {
"type": "boolean",
"description": ""
},
"impersonated_by": {
"type": "string",
"description": ""
},
"impersonate": {
"type": "string",
"description": ""
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment