- Simplified the `_infer_type_from_ast` function by consolidating conditional checks for argument annotations, enhancing readability and maintainability.
- Updated test cases in `tests/test_ast_inference.py` to utilize parameterization for better organization and coverage of edge cases in response model inference.
- Updated the `infer_response_model_from_ast` function to use `textwrap.dedent` for cleaner source code handling.
- Added multiple test cases in `tests/test_ast_inference.py` to cover various edge cases for response model inference, including functions with different return types and argument annotations.
- Improved type inference for functions returning lists and nested dictionaries, ensuring better schema generation.
- Introduced two new endpoints: "/db/direct_return" and "/db/dict_construction" to simulate database interactions.
- Added a FakeDB class to mock database behavior for testing purposes.
- Enhanced test cases to validate the OpenAPI schema for the new endpoints, ensuring correct response structure and types.
- Updated the response model inference logic in "APIRoute" to check for "None" before validating against "BaseModel".
- Refined the "infer_response_model_from_ast" function to handle nested function definitions and invalid dictionary keys, ensuring robust schema generation.
- Added new test cases for edge scenarios to validate the inference behavior.
- Added "infer_response_model_from_ast" function to analyze endpoint functions and infer Pydantic models from returned dictionary literals or variable assignments.
- Updated "APIRoute" to utilize the new inference method when the specified response model is not a subclass of "BaseModel"