Skip to content

Drupal Content Entity schema generator for Druxt with support for View and Form displays.

Schema (druxt-schema)

View source on GitHub

DruxtSchema : class

The core module functionality.

Provides methods for generating Druxt.js Schema files from the Drupal JSON:API.

See: DruxtSchema
Example

import { DruxtSchema } from 'druxt-schema'
const druxtSchema = new DruxtSchema('https://example.com', {})

DruxtSchemaMixin : object

Vue.js Mixin.

Adds required props and methods for lazy-loaded Schema support to custom Vue.js components.

See: DruxtSchemaMixin
Example

<script>
import { DruxtSchemaMixin } from 'druxt-schema'
export default {
  mixins: [DruxtSchemaMixin]
}
</script>

DruxtSchemaStore : function

The Vuex store module.

Contains actions for interacting with and caching the generated Schema files.

See: DruxtSchemaStore
Example (Manual usage)

import { DruxtSchemaStore } from 'druxt-schema'
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
const store = new Vuex.Store()
DruxtSchemaStore({ store })

DruxtSchemaNuxtModule : function

The Nuxt.js module function.

Installs the module functionality in a Nuxt.js frontend.

See

Example (nuxt.config.js)

module.exports = {
  modules: [
    'druxt-schema'
  ],
  druxt: {
    baseUrl: 'https://example.com'
  }
}

In this package

Nuxt module

Modules and classes

Stores

Mixins

Type definitions