grape-swagger-entity
grape-swagger-entity copied to clipboard
Fix: Properly parse custom array documentation
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)
| 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