Skip to content

Use serialized_name in Swagger UI Links section #3789

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

Closed
wants to merge 4 commits into from

Conversation

maxtorete
Copy link
Contributor

@maxtorete maxtorete commented Oct 25, 2020

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tickets fixes #3788
License MIT
Doc PR

Show custom serialized_name if set from Resource attributes in Swagger UI Links section instead original Resource property.

@maxtorete maxtorete changed the title Use serialized_context in Swagger UI Links section Use serialized_name in Swagger UI Links section Oct 25, 2020
@maxtorete maxtorete force-pushed the patch-3 branch 2 times, most recently from 18935e9 to addd778 Compare October 26, 2020 13:01
@maxtorete
Copy link
Contributor Author

Thanks for your help @dunglas, could you check again if this is the right way please?

@maxtorete maxtorete requested a review from dunglas October 26, 2020 13:04
@dunglas
Copy link
Member

dunglas commented Oct 26, 2020

This looks good to me! Can you also add some tests please?

@maxtorete
Copy link
Contributor Author

maxtorete commented Oct 26, 2020

This looks good to me! Can you also add some tests please?

@dunglas I added a test, but I found a problem in OperationPathResolver.php explained in this comment

So I think we can use this pull request to fix the custom serialized name error, and then create another issue to fix the hardcoded {id} parameter in the paths. What do you think?

@maxtorete
Copy link
Contributor Author

@dunglas I took the URI parameter name in Swagger UI Links section from the URI itself, so it should match the identifier property name in almost all cases. I took the last parameter in the URI, so it will work on subresources too.

I also added another assertion to test serialized name loading from Serializer attributes.

@soyuka soyuka added this to the 2.7 milestone Feb 6, 2021
@stale
Copy link

stale bot commented Nov 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 4, 2022
@stale
Copy link

stale bot commented Jan 3, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 3, 2023
@stale stale bot closed this Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants