PHPackages                             oposs/silverstripe-structured-data - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. oposs/silverstripe-structured-data

ActiveSilverstripe-vendormodule[API Development](/categories/api)

oposs/silverstripe-structured-data
==================================

Create, manage and validate structured yaml/json formatted text data

0.1.3(8mo ago)14121[1 issues](https://github.com/oposs/silverstripe-structured-data/issues)mitPHPPHP ^8.1

Since Nov 4Pushed 8mo ago5 watchersCompare

[ Source](https://github.com/oposs/silverstripe-structured-data)[ Packagist](https://packagist.org/packages/oposs/silverstripe-structured-data)[ Docs](https://oetiker.ch)[ RSS](/packages/oposs-silverstripe-structured-data/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)Dependencies (4)Versions (7)Used By (0)

Silverstripe structured data module
===================================

[](#silverstripe-structured-data-module)

Create, manage and validate structured yaml/json formatted text data and make it available through graphQL

Installation
------------

[](#installation)

Install through composer: `composer require oposs/silverstripe-structured-data`.

To enable the graphQL type, add the following lines to your `app/_config/graphql.yml`:

```
SilverStripe\GraphQL\Schema\Schema:
  schemas:
    default:
      src:
        - 'oposs/silverstripe-structured-data: _graphql'
```

If you just need a form field which can be validated against a JSON schema, you may want to disable the admin backend:

```
Oposs\StructuredData\Extensions\StructuredDataAdmin:
  show_admin_interface: false
```

Permissions
-----------

[](#permissions)

Global permissions provided by this module:

- `STRUCTURED_DATA_VIEW`: Ability to view the Structured Data Module and stored data and schemas
- `STRUCTURED_DATA_ADMIN`: Users holding this permission can edit/create/delete all data and schemas

Fine-grained control over editing access is possible by defining allowed groups for each data object individually.

Usage
-----

[](#usage)

Besides the possibility to access the data via graphQL this module also provides a specialized `StructuredDataField` which can be setup to validate it's input against a schema:

```
