Skip to content

Instantly share code, notes, and snippets.

@squallstar
Created May 23, 2023 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save squallstar/ca45a53f03ebcd809c18c9b948a1427b to your computer and use it in GitHub Desktop.
Save squallstar/ca45a53f03ebcd809c18c9b948a1427b to your computer and use it in GitHub Desktop.
AI Generated docs from Schema

Data Source Schema

This JSON schema defines the structure of a Data Source component used in Fliplet apps. The component includes a name, list of columns, entries (data), and access rules.

Properties

name

  • Type: string
  • Required: Yes
  • Title: The name of the data source.

columns

  • Type: array
  • Items: string
  • Required: Yes
  • Title: The list of columns included in the data source.

entries

  • Type: array
  • Items: object
  • Required: Yes
  • Title: The entries (data) for the data source.

accessRules

  • Type: array
  • Items: object
  • Required: Yes
  • Title: The access rules for the data source.

accessRules Properties

name

  • Type: string
  • Required: Yes
  • Title: The name of the access rule.

type

  • Type: array
  • Items: string (enum)
  • Required: Yes
  • Title: The type of access rule, which can be select, insert, update, or delete.

allow

  • Type: anyOf
    • Object: An object with a tokens property that includes an array of integers to specify access based on tokens provided.
    • String: A string that is either loggedIn or all to specify access for logged-in users or all users, respectively.
    • Object: An object that includes a user property to specify access based on user properties. The user object includes additionalProperties that specify the property values and whether they should equal, contain, or not equal a specified string.
  • Required: Yes
  • Title: The access rule allowing specific conditions.

appId

  • Type: array
  • Items: integer
  • Required: No
  • Title: The list of application IDs allowed for access.

script

  • Type: string
  • Required: No
  • Title: The custom script used for evaluating the access rule.

enabled

  • Type: boolean
  • Required: Yes
  • Title: Specifies whether the access rule is enabled or disabled.

exclude

  • Type: array
  • Items: string
  • Required: No
  • Title: The list of columns to exclude for this access rule.

include

  • Type: array
  • Items: string
  • Required: No
  • Title: The list of columns to include for this access rule.

require

  • Type: array
  • Items: anyOf
    • String: The required column for this access rule.
    • Object: An object that includes additionalProperties that specifies the property values and whether they should equal, contain, or not equal a specified string.
  • Required: No
  • Title: The list of columns or property requirements for this access rule.

Description

This schema defines the structure of a data source object that includes a name, list of columns, entries (data), and access rules. Developers should use this schema to generate the JSON code that is used to create data sources in Fliplet apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment