Skip to content

feat: rule now allows page[foo] defined without deepObject.#11

Merged
philsturgeon merged 1 commit into
mainfrom
feat/page-parameter-brackets
Apr 22, 2026
Merged

feat: rule now allows page[foo] defined without deepObject.#11
philsturgeon merged 1 commit into
mainfrom
feat/page-parameter-brackets

Conversation

@philsturgeon
Copy link
Copy Markdown
Collaborator

@philsturgeon philsturgeon commented Apr 21, 2026

Before it was demanding a deepObject, which not all tooling supports, and even when they do it somehow loses something.

Here is the deepObject rendered in Scalar.

image

I think I prefer this sort of view.

image

To do that (with the way existing tools work) it needs to be listed as two parameters.

components:
  parameters:
    PageNumber:
      name: page[number]
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1

    PageSize:
      name: page[size]
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 15

So I've made the rule respect this sort of structure (without specifying exactly what page[foo] you use, as JSON:API does not either.

@philsturgeon philsturgeon merged commit 749ead6 into main Apr 22, 2026
1 check passed
@philsturgeon philsturgeon deleted the feat/page-parameter-brackets branch April 22, 2026 10:15
apisyouwonthate-releasebot Bot pushed a commit that referenced this pull request Apr 22, 2026
## [2.2.0](v2.1.1...v2.2.0) (2026-04-22)

### Features

* rule page-parameter now allows page[foo] without deepObject ([#11](#11)) ([749ead6](749ead6))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant