Skip to main content

path

Attribute Macro path 

Source
#[path]
Expand description

Registers a utoipa endpoint for TypeScript API generation

This macro forwards all arguments to utoipa::path and additionally records supported endpoint metadata for utoipa_ts::export!

ยงSupported metadata

  • HTTP method, e.g. get, post, put
  • path = "/..."
  • params(...)
  • request_body = Type
  • request_body(content = Type, ...)
  • responses((status = 200, body = Type), ...)