awtkns / fastapi-crudrouter

A dynamic FastAPI router that automatically creates CRUD routes for your models
https://fastapi-crudrouter.awtkns.com
MIT License
1.38k stars 155 forks source link

Structural error for 404 HTTPException #155

Open AthreyVinay opened 2 years ago

AthreyVinay commented 2 years ago

Hi All - a bit confused where to create this -- whether here or FastAPI. Please let me know where -- but I'll post here first :)

So I use the CRUD router to auto-generate the /items/{item_id} route which calls FastAPI's HTTPException 404 in case item_id is not found. When I try to copy out the generated openapi.json in swagger-editor, I get the following:

Structural error at paths./items/{item_id}.get.responses.404
should NOT have additional properties
additionalProperty: detail

I am unable to fix this - any help is appreciated, thanks in advance.

AVR