Skip to content

Support overriding keys inline #135

@Evilbits

Description

@Evilbits

In order to clean up my documentation I have used parameter referencing as much as possible.
However it seems that there's no easy way of overriding attributes that are set in the parameter when it's defined.

An example is that I create the following id parameter and reference it throughout my documentation - but I would like to be more specific in the description.
This however seems to go for all keys and not just description.

# Swagger definition
swagger_root do
  # ...
  parameter :id do
    key :in, :path
    key :name, :id
    key :description, 'ID of resource to fetch.'
    key :required, true
    key :type, :integer
  end
  # ...
end

# In controller
swagger_path '/cats/{id}' do
  operation :get do
    # ...
    parameter :id do
      key :description, 'ID of Cat record to fetch'
    end
  end
end

Is there any way to achieve the desired effect?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions