Module: AnotherApi::OpenAPI::EndpointMetadata
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/another_api/openapi/endpoint_metadata.rb
Overview
Include this concern in API controllers to declare endpoint metadata that the OpenAPI generator picks up automatically.
class UsersController < AnotherApi::BaseController
include AnotherApi::OpenAPI::EndpointMetadata
api_resource "Account - Users",
schema: -> { MyApp::Schemas::V1::User },
description: "Manage users for your organisation"
api_action :index, summary: "List users"
api_action :show, summary: "Get a single user"
end