Skip to content

Doc block templates #6

@JoeeGrigg

Description

@JoeeGrigg

Allow for the top level doc block to use a template.

This would be useful to define a few default responses that come back with a certain type of request etc.

Possibly something like the below:

SinatraDoc.configure do
  doc_template :list do
    response code: 404 do
      prop :message, :string, "A message explaining that the resource was not found"
    end
  end
end

doc template: :list do
  ...
end
get "/items" do
  ...
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA completely new feature request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions