Skip to content

Survey JSON schema doesn't treat Boolean values as valid for the showQuestionNumbers property #10759

@JaneSjs

Description

@JaneSjs

T25982 - "showQuestionNumbers" in surveyjs_definition.json shows error for boolean types
https://surveyjs.answerdesk.io/internal/ticket/details/T25982


The showQuestionNumbers survey property is defined as follows in a survey JSON schema: https://github.com/surveyjs/survey-library/blob/fffdf935dc5f597baabfa84d36a4ab5a85a79582/packages/survey-core/docs/surveyjs_definition.json#L291C10-L291C29

"showQuestionNumbers": {
            "type": [
                "boolean",
                "string"
            ],
            "enum": [
                "on",
                "onPage",
                "recursive",
                "off"
            ]
        },

However, if you set this property to true/false, the following error appears:

Value is not accepted. Valid values: "on", "onPage", "recursive", "off".
Image

Test this JSON in VS Code:

{
  "$schema": "https://unpkg.com/survey-core/surveyjs_definition.json",
  "showQuestionNumbers": true,  
  "pages": [
    {
      "name": "page1",
      "elements": [
      ]
    }
  ]
}

Metadata

Metadata

Assignees

Labels

buguser issueAn issue or bug reported by users

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions