We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi after build_runner run the generated class in output.
The method returning class is not typecasted.
am I do it wrong ?
thank you for your help.
@GenApiClient() class IdentityApi extends ApiClient with _$IdentityApiClient { final Route base; final Map<String, CodecRepo> converters; final Duration timeout; IdentityApi({this.base, this.converters, this.timeout = const Duration(minutes: 2)}); /// /// /// @PostReq(path: "/login") Future<InlineResponse200> userMgmGetToken( @AsFormField() String grantType, @AsFormField() String password, @AsFormField() String username ) { return super.userMgmGetToken( grantType, password, username ).timeout(timeout); } /// /// /// @GetReq(path: "/logout", metadata: {"auth": [ {"type": "oauth2", "name": "OauthAuth" }]}) Future<InlineResponse2001> userMgmRevokeToken( ) { return super.userMgmRevokeToken( ).timeout(timeout); } /// /// /// @GetReq(path: "/test", metadata: {"auth": [ {"type": "oauth2", "name": "OauthAuth" }]}) Future<InlineResponse2001> userMgmTest( ) { return super.userMgmTest( ).timeout(timeout); } }
And the one generated by jaguar code gen
// GENERATED CODE - DO NOT MODIFY BY HAND part of 'identity_api.dart'; // ************************************************************************** // JaguarHttpGenerator // ************************************************************************** abstract class _$IdentityApiClient implements ApiClient { final String basePath = ""; dynamic userMgmGetToken( String grantType, String password, String username) async { var req = base.post .path(basePath) .path("/login") .urlEncodedFormField("grantType", grantType) .urlEncodedFormField("password", password) .urlEncodedFormField("username", username); return await req.go(throwOnErr: true); } dynamic userMgmRevokeToken() async { var req = base.get .metadata({ "auth": [ { "type": "oauth2", "name": "OauthAuth", } ], }) .path(basePath) .path("/logout"); return await req.go(throwOnErr: true); } dynamic userMgmTest() async { var req = base.get .metadata({ "auth": [ { "type": "oauth2", "name": "OauthAuth", } ], }) .path(basePath) .path("/test"); return await req.go(throwOnErr: true); } }
The text was updated successfully, but these errors were encountered:
Hello,
we have the same issue when using openapi generator. Did you find a solution?
Sorry, something went wrong.
No branches or pull requests
Hi
after build_runner run
the generated class in output.
The method returning class is not typecasted.
am I do it wrong ?
thank you for your help.
And the one generated by jaguar code gen
The text was updated successfully, but these errors were encountered: