An open API service indexing awesome lists of open source software.

https://github.com/graphiti-api/vandal_ui

Ruby gem for installing Vandal
https://github.com/graphiti-api/vandal_ui

Last synced: 8 months ago
JSON representation

Ruby gem for installing Vandal

Awesome Lists containing this project

README

          

# Vandal UI

This is a Rails engine for
[Graphiti](https://graphiti-api.github.io/graphiti/guides/) APIs. It has
two main functions:

* `rake vandal:install` will copy static files to `public/`.
* Mounting the engine adds an endpoint for a dynamically-generated
schema file:

```ruby
# 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.