Playset
OpenAPI document DSL for action_figure.
Playset composes action_figure actions into a reviewable OpenAPI document — the document is the first artifact, and everything else grows out of it:
- Document DSL — author paths, operations, and named schemas in Ruby;
compile to
openapi.yaml - Composition — inline operations are designs; composing an action class into the document is the claim "this is live"
- Conformance assertions — validate real responses against the document's schemas in your tests
- Coverage & route verification — every operation accounted for, every composed operation routed
Status: placeholder release reserving the gem name. The design lives in the action_figure project; nothing here is usable yet.
Installation
bundle add playset
Usage
module AcmeApi
include Playset[:jsend]
info title: "Acme Public API", version: "1.0.0"
Project = Schema.define do
integer :id
string :name, max_length: 120
end
path "/projects" do
post createProject: Projects::CreateAction do
summary "Create a project"
:projects
response 201, Project
end
end
end
(Aspirational — see status above.)
Development
After checking out the repo, run bin/setup to install dependencies. Then, run
rake test to run the tests. You can also run bin/console for an interactive
prompt that will allow you to experiment.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/urug/playset.
License
The gem is available as open source under the terms of the MIT License.