Sha256: 4af28c4f2507a9af333c9b7c4acbf42f1ca0173709c9de610ad14fafa75aa5f3
Contents?: true
Size: 1.28 KB
Versions: 17
Compression:
Stored size: 1.28 KB
Contents
# frozen_string_literal: true require_relative 'spec_media_types' Praxis::ApiDefinition.define do trait :test do description 'testing trait' end end class PeopleResource include Praxis::EndpointDefinition description 'People resource' media_type Person version '1.0' canonical_path :show trait :test prefix '/people' action :index do enable_large_params_proxy_action at: '/some/custom/path' description 'index description' routing do get '' end params do attribute :filters, String end end action :show do enable_large_params_proxy_action # Create an equivalent action named 'show_with_post' with the payload matching this action's parameters (except :id) description 'show description' routing do get '/:id' end params do attribute :id, Integer, required: true end end end class AddressResource include Praxis::EndpointDefinition description 'Address resource' media_type Address version '1.0' prefix '/addresses' action :index do description 'index description' routing do get '' end end action :show do description 'show description' routing do get '/:id' end params do attribute :id, Integer, required: true end end end
Version data entries
17 entries across 17 versions & 1 rubygems