Skip to content

Rewrite response bodies from patch.yml using Spectacular

Add a serializer or use inline_serializer and apply it using extend_schema(responses={201: ResultSerializer, 400: ErrorSerializer}).

You can use the OpenApiExample to document examples.

  • CreateEntityRole on HTTP 400 (id: corpus ID - corpus: errors that occurred on the corpus itself)
  • CreateImage on HTTP 400 (detail: error detail - id: UUID of an existing image - hash: errors on hash validation)
  • CreateImportTranskribus on HTTP 400 (collection_id: Errors on collection ID validation)
  • StartOAuthSignIn on HTTP 200 (url: URL the frontend should redirect to)
Edited by Eva Bardou