grape-swagger-entity icon indicating copy to clipboard operation
grape-swagger-entity copied to clipboard

Fix: Properly parse custom array documentation

Open numbata opened this issue 4 months ago • 1 comments

This PR addresses the issue where grape-swagger-entity was not correctly parsing custom array documentation (e.g., type: 'Array[Object]'), leading to incorrect Swagger schema generation.

The fix introduces a new array_type? method that intelligently identifies various array notations (is_array, type: 'array', or type: 'Array[Object]'). This ensures that the documentation override is correctly recognized and that the generated Swagger schema accurately reflects the intended type.

Part of [#962](https://github.com/ruby-grape/grape-swagger/issues/962)

numbata avatar Aug 24 '25 14:08 numbata

1 Warning
:warning: Unless you're refactoring existing code or improving documentation, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#86](https://github.com/ruby-grape/grape-swagger-entity/pull/86): Fix: properly parse custom array documentation - [@numbata](https://github.com/numbata).

Generated by :no_entry_sign: Danger

grape-bot avatar Aug 24 '25 14:08 grape-bot