Skip to content

Incorrect type for page_size, before, after parameters in /v1/files/{file_key}/versions #86

@AF-cgi

Description

@AF-cgi

Description

The page_size, before, and after query parameters in the /v1/files/{file_key}/versions endpoint are defined as type: number but should be type: integer.

Problem

When using code generators (e.g., swift-openapi-generator), the number type generates floating-point types (Double/Float). When serialized to query parameters, this results in values like 30.0 instead of 30.

The Figma API rejects these with:

{
  "error": true,
  "status": 400,
  "message": "'page_size' must be a valid number, received type String"
}

Expected

- name: page_size
  schema:
    type: integer  # not "number"

This should be the same for after and before too. Maybe there are further endpoints which has the same behavior and should be fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions