#Swagger: "Unknown Type: null"

1 messages · Page 1 of 1 (latest)

neat stag
#

When I check the documentation at the schema route, my optional fields are all showing this message in the UI:

{
  "name": "string",
  "subdomain": "Unknown Type: null"
}
class Account(BaseModel):
    name: str
    subdomain: Optional[str]

It appears that this should be supported in Open API 3.1 which is what the docs say litestar is using. Is there additional configuration missing from the docs to enable the nullable type?

iron skiff
#

try redoc , it is supported there .
Swagger is not 3.1 , yet (in stable version)