shopware / shopware/shopware

Schema mismatch on customer-recovery-is-expired breaks headless type generation

Open
#20,481 1 comment 0 reactions 1 assignee Claimed by @daniel3010 View on GitHub
component/customers domain/checkout Platform(Default) priority/low qi/sw-bugfixer
Dominant language
PHP
Stars
3.4k
Forks
1.2k
Avg merge
2d 23h
Merged PRs (30d)
433

Description

### Shopware Version

6.7.11.1

### Affected area / extension

Platform(Default)

### Description

There is a schema-to-runtime mismatch on the Store API for the `customer-recovery-is-expired` endpoint. The official OpenAPI schema defines the response payload as a wrapped `array_struct`, but the server actually responds with a flat, plain JSON object at runtime.

This forces developers using `@shopware/api-gen` or `openapi-typescript` to write manual type overrides (`Omit`) to prevent compilation errors.

### Actual behaviour

The live server bypasses the array envelope completely and returns a direct object structure:
```json
{
"isExpired": true
}
```

### Expected behaviour

The OpenAPI annotation on the backend controller should be adjusted to match the actual runtime output, changing the definition layout from an

### How to reproduce

1. Generate an API client library using Shopware's public OpenAPI definition for `POST /store-api/account/customer-recovery-is-expired`.
2. Inspect the generated TypeScript definitions. It expects:
```typescript
response: { data: Array<{ isExpired: boolean }> }
```
3. Execute a real request against the endpoint.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.