hapic
hapic copied to clipboard
Better support for multiple Schema for one http_error_code
from: https://github.com/algoo/hapic/blob/7e61d8fe1e7deb680be5bee0e6e4de9a79e6034b/hapic/doc/main.py#L171
openapi 2.0 doesn't support different schema, that why, in order to support multiple error message in documentation for one http error_code (like 400 BAD REQUEST), we pretend that all schema for a same error_code are the same and we choose to show only the schema of the first one (as openapi 2.0 doesn't allow to present multiple).
We should see how to have a better behaviour :
- Prevent case with a warning log ?
- See how this case can be solved in openapi 3.0.
- anything else ?