Skip to content

Parameter maximum value #1535

Closed
Closed
@CharlesP

Description

@CharlesP

When adding a parameter (i.e. per_page), is there a way to set the maximum value?

The cleanest (only) way I've found so far is to pass the entire array of possible options:
optional :per_page, values: [*1..100], default: 10, type: Integer

Is there a better way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions