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

User API: API fails if we skip component field, which is not marked as required #14594

Open
NihalJain opened this issue Dec 4, 2024 · 2 comments

Comments

@NihalJain
Copy link
Contributor

NihalJain commented Dec 4, 2024

Steps to reproduce:

curl -X 'GET' \
  'http://localhost:9000/users/{username}' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic dGVzdDp0ZXN0'

Expected:
Either

  • Details of user is returned, irrespective of component type
  • OR, the field should be marked as required in SwaggerUI

Actual:

{
  "code": 400,
  "error": "Cannot invoke \"org.apache.pinot.spi.config.user.ComponentType.name()\" because \"componentType\" is null"
}

Need to audit all User APIs and fix them appropriately.

@NihalJain
Copy link
Contributor Author

I plan to provide a fix on this, once the expected behaviour is confirmed by the team!

@Jackie-Jiang
Copy link
Contributor

Good catch! The easier fix is to mark component type as required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants