Files
dify/api/controllers/openapi
L1nSn0w dbe0d23eb3 refactor(openapi): extend @accepts to the remaining body-validation handlers
Finish unifying request validation so every validation failure on the
openapi surface (except the excluded OAuth device-flow) returns 422:

- migrate workspace member invite (POST) and role update (PUT) and the
  human-input form submit (POST) onto @accepts(body=); drop the local
  _validate_body helper. human-input previously ran a bare model_validate
  with no handler, so a malformed body surfaced as 500 — now a clean 422.
  Service-layer domain errors keep their intentional 400s.
- harden @returns to pass (model, status, headers) tuples through verbatim
  instead of assuming a 2-tuple.
- stop test_contract from leaking test-only models into the shared
  openapi_ns, and assert the contract decorators' Swagger metadata
  (params/expect/responses) survives the guard wrapper stack.

Spec-neutral: the migrated handlers already advertised the same expect
models, so the generated swagger/markdown/contracts are unchanged.
2026-06-10 10:04:43 +08:00
..
2026-05-26 01:12:36 +00:00
2026-05-26 01:12:36 +00:00