Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] [Client: Perl] Questionable User Agent Information #14297

Closed
XSven opened this issue Dec 20, 2022 · 0 comments
Closed

[REQ] [Client: Perl] Questionable User Agent Information #14297

XSven opened this issue Dec 20, 2022 · 0 comments

Comments

@XSven
Copy link

XSven commented Dec 20, 2022

Is your feature request related to a problem? Please describe.

I think the default User Agent Information defined in the configuration class is questinonable.

package WWW::OpenAPIClient::Configuration;
...
use constant VERSION => '1.0.0';
...
$p{http_user_agent} //= 'OpenAPI-Generator/1.0.0/perl';
...

Describe the solution you'd like

If the 1.0.0 version refers to the VERSION constant, it is my question why the constant is not interpolated

$p{http_user_agent} //= "OpenAPI-Generator/@{[VERSION]}/perl";

Describe alternatives you've considered

From my perspective the version number should refer to the version of the OpenAPI-Generator and to the perl version too. In my case this was 6.2.1 and 5.14.4. This could be an alternative

$p{http_user_agent} //=sprintf('OpenAPI-Generator/%s perl/%vd', '6.2.1', $^V);

Additional context

I guess the VERSION constant refers to the release cycle of the client itself. This should be another part of the User Agent Information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant