Skip to content

Invalid default value in /deep-research formats property #23

@kamilrzany

Description

@kamilrzany

Problem

OpenAPI Generator fails with validation error when generating code from the schema at firecrawl-docs/api-reference/v1-openapi.json:

-attribute paths.'/deep-research'(post).requestBody.content.'application/json'.schema.default is not of type `string`

Root Cause

In /deep-research endpoint, the formats property has default incorrectly placed in items instead of at property level:
Current (incorrect):

"formats": {
    "type": "array",
    "items": {
        "type": "string",
        "enum": ["markdown", "json"],
        "default": ["markdown"]  // Array default in string items schema
    }
}

Should be:

"formats": {
    "type": "array",
    "items": {
        "type": "string",
        "enum": ["markdown", "json"]
    },
    "default": ["markdown"]  // Array default at array property level
}

Fix

Move the default: ["markdown"] from items to the formats property level.
Location: paths["/deep-research"].post.requestBody.content["application/json"].schema.properties.formats
This fixes the type mismatch where a string schema had an array default value, allowing OpenAPI Generator to process the schema successfully.

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