Open mettekou opened 1 year ago
Sure why not. The possibilities of how to integrate / implement such capability to utoipa
can be explored in future. Though it might be better if the support is directly implemented to the corresponding crates, so whenever they change the changes are reflected to utoipa
as well. Otherwise utoipa
must be able to keep track of possible changes in the spec and act accordingly. However if, and most likely so, the spec is not going to be changed frequently which would help to keep the maintenance overhead low. But the manual implementation of schemas would need duplicate work for declaring the properties of the possible types.
Sure why not. The possibilities of how to integrate / implement such capability to
utoipa
can be explored in future. Though it might be better if the support is directly implemented to the corresponding crates, so whenever they change the changes are reflected toutoipa
as well. Otherwiseutoipa
must be able to keep track of possible changes in the spec and act accordingly. However if, and most likely so, the spec is not going to be changed frequently which would help to keep the maintenance overhead low. But the manual implementation of schemas would need duplicate work for declaring the properties of the possible types.
EDIT: @juhaku I have reached out to the authors of those libraries about integration with utoipa
.
RFC-7807 is a popular standard for HTTP API error response bodies. Both the
problemdetails
andhttp-api-problem
crates implement this standard. Would it be a good idea to implement schemas for the relevant types from these crates?