Auto-generate columns doesn't work for Swagger

I created a data source with the following openapi.json

{
  "openapi": "3.0.2",
  "info": {
    "title": "FastAPI",
    "version": "0.1.0"
  },
  "paths": {
    "/stuff": {
      "get": {
        "summary": "Stuff",
        "operationId": "stuff_stuff_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Stuff Stuff Get",
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Message"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Message": {
        "title": "Message",
        "required": [
          "msg"
        ],
        "type": "object",
        "properties": {
          "msg": {
            "title": "Msg",
            "type": "string"
          }
        }
      }
    }
  }
}

If I bind stuff_stuff_get to a data grid I can't autogenerate columns even though the response schema is there. Any suggestions?

In my opinion the content -> application/json is preventing Radzen to discover the return schema. If "schema" is direct child of responses -> 200 it should work.

Indeed Radzen does not support Swagger 3.0 at the moment. Only 2.0.

1 Like

Thanks:) Apparently there are converters from OpenAPI 3 to OpenAPI/Swagger 2. Btw a helpful error message would be good.