Skip to content

Fix getAccount endpoint response type from array to single account object #567

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
CalebBarnes opened this issue Jun 10, 2025 · 0 comments · May be fixed by #568
Open

Fix getAccount endpoint response type from array to single account object #567

CalebBarnes opened this issue Jun 10, 2025 · 0 comments · May be fixed by #568
Assignees

Comments

@CalebBarnes
Copy link
Contributor

Issue Description

The getAccount endpoint in the OpenAPI spec is incorrectly documented as returning an array of accounts, but it actually returns a single account object.

Current Behavior

The OpenAPI spec shows:

type: array

Reference: https://open-api.netlify.com/#tag/accountMembership/operation/getAccount

Expected Behavior

The endpoint should be documented as returning a single Account object, not an array.

Context

This discrepancy was identified during development work where the actual API response returns a single account object, but the generated types and documentation suggest it returns an array. This causes confusion for developers using the API and can lead to incorrect implementation.

Solution

Update the OpenAPI specification to correctly reflect that the getAccount endpoint returns a single account object rather than an array of accounts.

Related

Similar issue was previously fixed for getCurrentUser in #557.

@CalebBarnes CalebBarnes changed the title Fix getAccount endpoint response type from array to single account object Fix getAccount endpoint response type from array to single account object Jun 10, 2025
@CalebBarnes CalebBarnes self-assigned this Jun 10, 2025
CalebBarnes added a commit that referenced this issue Jun 10, 2025
The getAccount endpoint was incorrectly documented as returning an array
of accountMembership objects, but it actually returns a single
accountMembership object. This change updates the OpenAPI specification
to correctly reflect the actual API behavior.

This fix ensures consistency with other similar single-object endpoints
like createAccount, updateAccount, and getCurrentUser.

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

Successfully merging a pull request may close this issue.

1 participant