heartbit-be commented on issue #33884:
URL: https://github.com/apache/superset/issues/33884#issuecomment-4498326515

   I am still encountering this issue today. Using superset 6.1.0 with the 
openapi.json spec as defined in this repo (@ 
`docs/static/resources/openapi.json`). You can see [on this 
line](https://github.com/apache/superset/blob/6e8b3bf9761eea0c7ac7a75d32f8fc6145b53ffd/docs/static/resources/openapi.json#L3657)
 that the dashboard owners are defined as a single `User2` object:
   ```
   "owners": {
       "$ref": "#/components/schemas/DashboardRestApi.get_list.User2"
   },
   ```
   
   So the NSwag generated client fails at runtime when trying to list the 
dashboards through the API. The same issue is present for the dashboard roles 
and tags. As @dosu suggests, I fixed it on my side by updating the openapi.json 
file, like so:
   
      ```bash
      jq '
        .components.schemas["DashboardRestApi.get_list"].properties.owners = 
{"type":"array","items":{"$ref":"#/components/schemas/DashboardRestApi.get_list.User2"}}
        | .components.schemas["DashboardRestApi.get_list"].properties.roles  = 
{"type":"array","items":{"$ref":"#/components/schemas/DashboardRestApi.get_list.Role"}}
        | .components.schemas["DashboardRestApi.get_list"].properties.tags   = 
{"type":"array","items":{"$ref":"#/components/schemas/DashboardRestApi.get_list.Tag"}}
      ' _openapi.json > _openapi.patched.json && mv _openapi.patched.json 
_openapi.json
      ```


-- 
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]

Reply via email to