Skip to content

Fix: Recognize Grape::API::Boolean as a primitive type #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

numbata
Copy link
Collaborator

@numbata numbata commented May 7, 2025

This pull request addresses an issue in the GrapeSwagger::Entity::AttributeParser where the Grape::API::Boolean and other type was not being recognized as a primitive type during Swagger schema generation.

These changes ensure that primitive types are correctly represented in the generated Swagger documentation.

numbata added 3 commits May 8, 2025 01:32
The `AttributeParser` was not correctly identifying `Grape::API::Boolean` as a primitive type,
leading to incorrect Swagger schema generation for boolean attributes.

This commit updates the `ADDITIONAL_PRIMITIVE_TYPES` constant to include "boolean".

This resolves issues where boolean types were potentially being treated as complex objects
or having incorrect type definitions in the generated Swagger documentation.
@numbata numbata force-pushed the fix/recognize-grape-boolean-primitive branch from 0c5bd2f to 686d9a4 Compare May 7, 2025 23:32
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit.

@numbata numbata requested a review from dblock May 8, 2025 19:46
@numbata numbata self-assigned this May 8, 2025
@dblock dblock merged commit e5a94a5 into ruby-grape:master May 9, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants