Skip to content

Rewrite request bodies from patch.yml using Spectacular

Add a serializer or use inline_serializer and apply it using extend_schema(request=TheSerializer).

  • AddSelection (required array of elements ids)
  • RemoveSelection (optional request body with an element id)
    • Check using the API client that body= is not required
    • Fallback if body cannot be made optional: just make id optional (body={} will be required)
Edited by Eva Bardou