Skip to content
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

Fix params extension does not work when param_type is body #918

Merged

Conversation

numbata
Copy link
Contributor

@numbata numbata commented Jan 19, 2024

This pull request resolves issue #901 by implementing the add_extension_properties method in MoveParams. The issue caused custom extension properties in body parameters to be excluded from the generated Swagger documentation.

This new method ensures that any key/value pairs prefixed with 'x-' in the schema definition of the body parameter are correctly processed and included in the Swagger output. The processing of parameters in both MoveParams and ParseParams has been updated to use this new functionality.

These changes ensure that custom extensions, such as x: { some: 'stuff' }, are accurately documented in the Swagger output, resulting in comprehensive and precise API documentation.

A new test case has also been added to verify the accurate reflection of custom extension properties in the Swagger documentation. The test case can be found at spec/issues/901_extensions_on_body_params_spec.rb.

@numbata numbata changed the title Fix: Include Custom Extension Properties in Body Parameter Documentation Fix params extension does not work when param_type is body Jan 19, 2024
@numbata numbata force-pushed the add_extension_properties_to_schema branch from 8e222eb to 57339b6 Compare January 19, 2024 09:28
Copy link
Member

@LeFnord LeFnord left a comment

Choose a reason for hiding this comment

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

thanks @numbata … it seems to be a welcome fix, so will do a release in the next days

@LeFnord LeFnord merged commit de6f094 into ruby-grape:master Jan 22, 2024
21 checks passed
@numbata
Copy link
Contributor Author

numbata commented Jan 29, 2024

@LeFnord do you have an estimate for the next release?

@numbata
Copy link
Contributor Author

numbata commented Feb 2, 2024

@mscrivo maybe you knows something about next release? 🥺

@LeFnord
Copy link
Member

LeFnord commented Feb 2, 2024

no hurry … I'm on

@LeFnord
Copy link
Member

LeFnord commented Feb 2, 2024

done

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