API - Define mandatory parameters

Hi,

Is it possible to define a mandatory parameter for an API endpoint?
For example a parameter named ID.

Thanks!

Like this?

New-PSUEndpoint -Url '/user' -Method Post -Endpoint {
    param([Parameter(Mandatory)]$userName, $FirstName, $LastName)
     
    New-User $UserName -FirstName $FirstName -LastName $LastName
}

@PorreKaj the following code I’ve already added. But it doesn’t work.
The “Required” flag isn’t vissible in the SwaggerUI documentation.

Param (

[Parameter(Mandatory)]
$Id

)