Open lucasteles opened 1 month ago
Hi! You are the first asking that.
If I understand, you want to define these schemas for reuse in @request_body
or @response
and don't to have to repeat the description every time you document an endpoint. I am right? It sounds perfect to me, but I am currently without time for developing a new feature. However, I will be happy to review/discuss a proposal.
In that case should be something like:
# @schema Data [Hash{name: String, age: Integer}]
class Data
attrs_accesor :name, :age
end
Then use in the controller as
# @request_body A Person [Data]
def create
...
end
Is that what you mean?
Is there any way or plan to define the schema for any class?
Something like: