rest.schema.yml 2.45 KB
Newer Older
1 2
# Schema for the configuration files of the REST module.
rest.settings:
3
  type: config_object
4 5
  label: 'REST settings'
  mapping:
6
    # @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
7 8 9
    link_domain:
      type: string
      label: 'Domain of the relation'
10 11 12
    bc_entity_resource_permissions:
      type: boolean
      label: 'Whether the pre Drupal 8.2.x behavior of having permissions for EntityResource is enabled or not.'
13

14 15
# Method-level granularity of REST resource configuration.
rest_resource.method:
16 17
  type: mapping
  mapping:
18 19 20
    HEAD:
      type: rest_request
      label: 'HEAD method settings'
21 22 23 24 25 26
    GET:
      type: rest_request
      label: 'GET method settings'
    POST:
      type: rest_request
      label: 'POST method settings'
27
    PUT:
28
      type: rest_request
29
      label: 'PUT method settings'
30 31 32
    DELETE:
      type: rest_request
      label: 'DELETE method settings'
33 34 35 36 37 38 39 40 41 42 43 44
    TRACE:
      type: rest_request
      label: 'TRACE method settings'
    OPTIONS:
      type: rest_request
      label: 'OPTIONS method settings'
    CONNECT:
      type: rest_request
      label: 'CONNECT method settings'
    PATCH:
      type: rest_request
      label: 'PATCH method settings'
45

46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
# Resource-level granularity of REST resource configuration.
rest_resource.resource:
  type: mapping
  mapping:
    methods:
      type: sequence
      label: 'Supported methods'
      sequence:
        type: string
        label: 'HTTP method'
    formats:
      type: sequence
      label: 'Supported formats'
      sequence:
        type: string
        label: 'Format'
    authentication:
      type: sequence
      label: 'Supported authentication providers'
      sequence:
        type: string
        label: 'Authentication provider'

69 70 71 72
rest_request:
  type: mapping
  mapping:
    supported_formats:
73 74 75
      type: sequence
      label: 'Supported format'
      sequence:
76 77
        type: string
        label: 'Format'
78 79
    supported_auth:
      type: sequence
80
      label: 'Supported authentication'
81
      sequence:
82 83
        type: string
        label: 'Authentication'
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

rest.resource.*:
  type: config_entity
  label: 'REST resource config'
  mapping:
    id:
      type: string
      label: 'REST resource config ID'
    plugin_id:
      type: string
      label: 'REST resource plugin id'
    granularity:
      type: string
      label: 'REST resource configuration granularity'
    configuration:
      type: rest_resource.[%parent.granularity]
      label: 'REST resource configuration'