dosubot[bot] commented on issue #33884: URL: https://github.com/apache/superset/issues/33884#issuecomment-4498355217
<!-- Answer --> Thanks for confirming and sharing your workaround, @heartbit-be. This is indeed a real bug in the generated `openapi.json`. The root cause is in how the `DashboardGetResponseSchema` defines these fields in `superset/dashboards/schemas.py` [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/dashboards/schemas.py#L228-L230). While `owners` and `roles` use `fields.List(fields.Nested(...))`, the `tags` field uses `fields.Nested(TagSchema, many=True)`. Both patterns produce lists at runtime, but the OpenAPI spec generator (apispec) incorrectly renders them as single object references instead of arrays when generating the spec via the `superset update-api-docs` CLI command [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/cli/update.py#L74-L102). You can see the incorrect output in the generated `openapi.json` where all three fields (`owners`, `roles`, `tags`) end up as bare `$ref` objects rather than `{"type": "array", "items": {"$ref": ...}}` . A proper fix would involve either: 1. Ensuring all list fields in `DashboardGetResponseSchema` consistently use `fields.List(fields.Nested(...))` (which may still not fix the apispec output depending on the version), or 2. Investigating why apispec doesn't correctly handle these patterns for the GET list schema, since the POST/PUT schemas generate correct array definitions . Your `jq` patch is a solid workaround in the meantime. This seems like something worth a PR to fix upstream — the schema definition or the generation process needs correction so that regenerating the spec produces correct array types for these fields. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=ba926750-7e13-4b10-ad89-403975d1524c) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
