a-chacon / oas_rails

Generate Automatic Interactive Documentation for Your Rails API
GNU General Public License v3.0
69 stars 4 forks source link

Request Body boolean or datetime. And support for deep structures. #37

Closed a-chacon closed 3 months ago

a-chacon commented 3 months ago

This PR introduce a change in the way the response and request body tags are used.

Before:

# @request_body The user to be created [Hash] {user: {name: String, age: Integer, password: String}}

Now:

# @request_body The user to be created [!Hash{user: {name: !String, age: Integer, password: String}}]

Notice that you can indicate when a field or structure is required by put a ! before. And all is described inside the [ ] .

This add support for deep structures and fixes Boolean, Date and DateTime fields.