Document public_email and email in the service accounts API

What does this MR do and why?

Every endpoint on this page that returns a service account renders API::Entities::ServiceAccount, which inherits id, username, public_email and name from UserSafe and then adds email and unconfirmed_email. The response attribute tables of the two retrieve endpoints already list all six, but none of the 14 example response objects on the page showed public_email, and the instance list example showed neither public_email nor email, which that response has carried since the email attribute was added in GitLab 17.9.

This adds public_email to all 14 example objects and email to the two objects of the instance list example. I placed public_email between username and name, and email after name, so every example keeps the order the entity exposes its fields in rather than appending the field at the end. Its value is empty because a service account has no verified public email address, which is also what an instance returns for any user who has not set one.

unconfirmed_email is exposed only while a confirmation is pending, so the examples that already show it are left as they are and no other example gains it. The personal access token examples on the same page are API::Entities::PersonalAccessToken and API::Entities::PersonalAccessTokenWithToken, so they are untouched. The two response attribute tables were already complete and needed no change.

I found this while adding the same fields to the Go API client, in gitlab-org/api/client-go!3047 (merged).

MR acceptance checklist

This change is documentation only. Every example response on the page still parses as JSON, and no endpoint, parameter or behaviour changes.

Merge request reports

Loading
Loading