-
Notifications
You must be signed in to change notification settings - Fork 467
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
Swagger Documentation for /v1/api-token
Endpoints
#29742
Comments
### Proposed Changes * Adding documentation to api-token endpoints Refs: #29742 ### Checklist - [ ] Tests - [ ] Translations - [ ] Security Implications Contemplated (add notes if applicable) ### Additional Info ** any additional useful context or info ** ### Screenshots Original | Updated :-------------------------:|:-------------------------: ** original screenshot ** | ** updated screenshot ** --------- Co-authored-by: Nollymar Longa <[email protected]> Co-authored-by: nollymarlonga <[email protected]>
IQA FAILEDTested on You can view the detailed findings here: Document. In summary, I found inconsistencies between the response descriptions and the actual outputs returned by the endpoints. There are also some typos and discrepancies in the parameter names. I couldn't test the POST request as it returns a 400 error. This might be due to an issue with the body I'm passing, but I haven't identified the exact problem. The
|
Good comments in that doc. I'll do a review as well as soon as I can. That said, that /remote endpoint's out-of-bounds error likely points to a value mismatch of some sort; Gavriella was getting it while using dummy values (like https://github.com/dotCMS/core/tree/master/docker/docker-compose-examples/push-publish For example, I was able to succeed with the following data payload from the (8081) sender environment:
|
This addresses everything raised in [this IQA doc](https://docs.google.com/document/d/1_z7j9sRbIlZv-aIjj1eBlOY8TU014cTCDsej6W6MF-A/edit), and then further issues I found while working on that initial batch. I won't go point by point on this in the bullets below, because it's quite a lot and I've completely lost track of them all. But I'll list the biggest ones I can remember. ### Proposed Changes * All concerns in document addressed * Both forms edited * ApiTokenForm got a couple of `@Hidden` annotations for unnecessary props * RemoteApiTokenForm had a bunch of variables renamed so error messages make more sense if a key property is omitted. * Both user-based revocation endpoints have been `@Hidden`, as neither of them appears to work. * (Also found another unrelated bug in the API token UI; separate issue forthcoming. ) * EDIT: #30268 is the issue, and it turns out not to be unrelated at all. Removing unnecessary `@Consumes` annotations fixes it, so the current PR will resolve it. Shoutout to @valentinogiardino for his sharp eye! * Various text fixes * Various schema fixes * Various response example fixes * Several endpoint descriptions corrected * Various request body description and/or example fixes * Tag adjustment ### Checklist - [ ] Tests - [ ] Translations - [ ] Security Implications Contemplated (add notes if applicable)
IQA PASSEDTested on |
Fixed, tested in the last trunk and now the doc looks ok |
Parent Issue
28600
Task
Add Swagger documentation to api-token endpoints.
Proposed Objective
Documentation
Proposed Priority
Priority 3 - Average
Acceptance Criteria
Add endpoints should contain the following information in playground:
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
Endpoints being documented:
/v1/apitoken
/v1/apitoken/{tokenId}
/v1/apitoken/{tokenId}/jwt
/v1/apitoken/{tokenId}/revoke
/v1/apitoken/{userId}/tokens
/v1/apitoken/remote
/v1/apitoken/users/{userid}/revoke
/v1/apitoken/users/revoke
The text was updated successfully, but these errors were encountered: