mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-29 10:18:29 -04:00
Declare read-only resources and the owner relationship once each, make the resource hook helpers private, simplify token auth, and cache the generated API docs for an hour.
12 lines
253 B
Ruby
12 lines
253 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
# The API's own description, for Swagger UI at /api-docs.
|
|
class DocsController < ActionController::API
|
|
def show
|
|
expires_in 1.hour, public: true
|
|
render json: ApiDocs.openapi
|
|
end
|
|
end
|
|
end
|