https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/ Path Parameters and Numeric Validations - FastAPI Path Parameters and Numeric Validations In the same way that you can declare more validations and metadata for query parameters with Query, you can declare the same type of validations and metadata for path parameters with Path. Import Path First, import P fastapi.tiangolo.com..