graphiti-api / vandal_ui

Ruby gem for installing Vandal
MIT License
9 stars 12 forks source link

Vandal UI

This is a Rails engine for Graphiti APIs. It has two main functions:

# config/routes.rb

scope path: ApplicationResource.endpoint_namespace, defaults: { format: :jsonapi } do
  # ... routes ...

  mount VandalUi::Engine, at: '/vandal'
end

If ApplicationRecord.endpoint_namespace is /api/v1, you'd get a /api/v1/vandal/schema.json that would be referenced when loading the UI.