Skip to content

Update docblocks' return types in client.lua #14390

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

steveoliver
Copy link

Summary

I found it confusing that the kong.client documentation said kong.client.get_credential() returns a string, but the @treturn and example usage indicate that in fact a table is returned. While I was in there, I saw other places where return values seem to have been mis-documented the other way around - where @treturn was indicated, but the return values were actually string.

I am not sure of all of the table items returned from get_credential(), but from what I can tell it is just id, consumer_id, and username. I need someone to confirm if that is all.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - (N/A - this PR handles the auto-generated PDK docs)
  • Somebody besides @steveoliver confirms the items returned from ngx.ctx.authenticated_credential.

Issue reference

Fix #[issue number]

@team-eng-enablement team-eng-enablement added the author/community PRs from the open-source community (not Kong Inc) label Apr 2, 2025
@steveoliver
Copy link
Author

Anything else needed from me in order to move this forward?

Copy link
Member

@oowl oowl left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author/community PRs from the open-source community (not Kong Inc) size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants