Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default values displayed incorrectly as "[object Object]" #2423

Closed
dquig opened this issue Oct 2, 2023 · 0 comments · Fixed by #2437
Closed

default values displayed incorrectly as "[object Object]" #2423

dquig opened this issue Oct 2, 2023 · 0 comments · Fixed by #2437
Assignees

Comments

@dquig
Copy link

dquig commented Oct 2, 2023

Describe the bug

In 2.1.x, the following request body

{
    "Observation": {
        "title": "Thing",
        "required": [
            "fields",
            "id"
        ],
        "type": "object",
        "properties": {
            "fields": {
                "title": "Fields",
                "type": "object",
                "additionalProperties": {
                    "anyOf": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "number"
                            }
                        }
                    ]
                },
            },
            "meta": {
                "title": "Meta",
                "allOf": [
                    {
                        "$ref": "#/components/schemas/ThingMeta"
                    }
                ],
                "description": "Thing metadata.",
                "default": {
                    "properties": {}
                }
            },
            "id": {
                "title": "Id",
                "type": "string",
                "description": "Unique id of the Thing."
            }
        }
    }
}

Renders like

image

Expected behavior

2.0.0 renders the meta field as expected

image

Minimal reproducible OpenAPI snippet(if possible)

Provided inline

Screenshots

Provided inline

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants