You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Endpoints with only 3xx responses are rejected as invalid (no generated method) #413
When using openapi-processor-spring, operations that only declare redirect
responses (e.g. HTTP 302) are considered invalid and are not generated in the
Spring interface.
The processor reports an error similar to
endpoint '/logout' has no success 2xx response.
As a result, no method is generated for the endpoint.
Example OpenAPI
### Example OpenAPI
```yaml
/authorize:
get:
summary: OAuth2 authorize endpoint
responses:
'302':
description: Redirect to authorization server
headers:
Location:
schema:
type: string
This OpenAPI definition is valid and accurately describes the runtime behavior:
the endpoint always responds with a redirect and never returns a 2xx response.
Actual behaviour:
The processor reports a validation error: endpoint has no success 2xx response
No method is generated in the Spring interface
Expected behaviour:
The processor should generate the endpoint method even if the operation only
defines 3xx responses.
Redirect-based endpoints are a valid and common HTTP pattern, especially in
browser-based flows such as:
OAuth2 /authorize
login / logout endpoints
SSO / identity provider redirects
Requiring an artificial 2xx response (e.g. a dummy 204) just to satisfy the
generator leads to OpenAPI specifications that do not accurately reflect
runtime behavior.
Activity
hauner commentedon Jan 16, 2026
I can reproduce this.
It considers 4xx and 5xx as errors and it considers 2xx as success. I think it should accept 1xx/3xx as success too.
accept 1xx/3xx as success codes (openapi-processor/openapi-processor-…
avoid deprecated http status (openapi-processor/openapi-processor-spr…
add unit tests (openapi-processor/openapi-processor-spring#413)
update error message (openapi-processor/openapi-processor-spring#413)