jejacks0n / apitome

Apitome: /iˈpitəmē/ An API documentation presentation layer for RSpec API Documentation output.
250 stars 126 forks source link

Use format_scope for response_fields partial #109

Closed rossta closed 5 years ago

rossta commented 5 years ago

When using a nested scope for the response field method, such as:

response_field :value, "A value", scope: [:item, :item_id]

the HTML generated in the Response Fields, Name column reads as:

["item", "item_id"][value]

I believe the expected behavior is to display:

item[item_id][value]

Using the format_scope helper fixes the issue.

Also adds a few spec for the helper method.

jejacks0n commented 5 years ago

Thanks, I'd never nested them like that. =)

rossta commented 5 years ago

Thanks for the fast response!