private function getCreatePath(EntityDefinition
$definition): Post
{ $schemaName =
$this->
snakeCaseToCamelCase($definition->
getEntityName());
$tags =
[$this->
convertToHumanReadable($definition->
getEntityName())];
if ($experimental =
$this->
isExperimental($definition)) { $tags[] = 'Experimental';
} return new Post([ 'summary' => 'Create a new ' .
$this->
convertToHumanReadable($definition->
getEntityName()) . ' resources.' .
($experimental ? ' Experimental API, not part of our backwards compatibility promise, thus this API can introduce breaking changes at any time.' : ''
),
'description' =>
$definition->
since() ? 'Available since: ' .
$definition->
since() : '',
'tags' =>
$tags,
'operationId' => 'create' .
$this->
convertToOperationId($definition->
getEntityName()),
'parameters' =>
[ new Parameter([ 'name' => '_response',
'in' => 'query',
'schema' =>
['type' => 'string', 'enum' =>
['basic', 'detail'
]],
'description' => 'Data format for response. Empty if none is provided.',
]),
],