[BUG] endpointPathPrefix in YouTrackClient
Closed this issue · 3 comments
https://www.jetbrains.com/help/youtrack/incloud/api-rest-api-url-and-endpoints.html
According to documentation API endpoint starts with '/youtrack/api' or 'api'
So there's no need to add this to url
/src/Client/YouTrackClient.php
private $endpointPathPrefix = 'rest';
Function below
protected function buildUri(string $uri): string
{
return $this->endpointPathPrefix . '/' . ltrim($uri, '/');
}
should look like this
protected function buildUri(string $uri): string
{
return ltrim($uri, '/');
}
Or better make this variable configurable, that would help a lot.
@Shocky92 I've implemented it this way because this prefix was default in self-hosted YouTrack application. It might be different in cloud solution.
I'm not sure I can dive into this issue right now. Feel free to commit PR to move it forward.
Accordingly to the docs this rest
prefix is deprecated.
Old: https://www.jetbrains.com/help/youtrack/standalone/2019.2/Create-New-Issue.html
New: https://www.jetbrains.com/help/youtrack/standalone/2019.2/resource-api-issues.html#create-Issue-method
This feature implemented by @asteisiunas and published as cybercog/youtrack-rest-php minor 6.2.0 release. Just make composer update.