You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Send instruction /// Send token to update password /// /// Parameters: /// * [UNKNOWN_BASE_TYPE] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [JsonObject] as data /// Throws [DioError] if API call or serialization failsFuture<Response<JsonObject>> sendPasswordToken({
UNKNOWN_BASE_TYPE?UNKNOWN_BASE_TYPE,
CancelToken? cancelToken,
Map<String, dynamic>? headers,
Map<String, dynamic>? extra,
ValidateStatus? validateStatus,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
final _path =r'/api/users/password';
final _options =Options(
method:r'POST',
headers:<String, dynamic>{
...?headers,
},
extra:<String, dynamic>{
'secure':<Map<String, String>>[
{
'type':'http',
'scheme':'bearer',
'name':'BearerToken',
},
],
...?extra,
},
contentType:'application/json',
validateStatus: validateStatus,
);
dynamic _bodyData;
try {
const _type =FullType(UNKNOWN_BASE_TYPE);
_bodyData =UNKNOWN_BASE_TYPE==null?null: _serializers.serialize(UNKNOWN_BASE_TYPE, specifiedType: _type);
} catch(error, stackTrace) {
throwDioError(
requestOptions: _options.compose(
_dio.options,
_path,
),
type:DioErrorType.other,
error: error,
)..stackTrace = stackTrace;
}
final _response =await _dio.request<Object>(
_path,
data: _bodyData,
options: _options,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
);
JsonObject _responseData;
try {
const _responseType =FullType(JsonObject);
_responseData = _serializers.deserialize(
_response.data!,
specifiedType: _responseType,
) asJsonObject;
} catch (error, stackTrace) {
throwDioError(
requestOptions: _response.requestOptions,
response: _response,
type:DioErrorType.other,
error: error,
)..stackTrace = stackTrace;
}
returnResponse<JsonObject>(
data: _responseData,
headers: _response.headers,
isRedirect: _response.isRedirect,
requestOptions: _response.requestOptions,
redirects: _response.redirects,
statusCode: _response.statusCode,
statusMessage: _response.statusMessage,
extra: _response.extra,
);
}
Bug Report Checklist
Description
When i set schema directly, it returns UNKNOWN_BASE_TYPE model but if i create components/schema and use ref it works.
openapi-generator version
From https://github.com/gibahjoe/openapi-generator-dart/blob/3.3.0/openapi-generator-cli/pom.xml
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Nothing found
Suggest a fix
Use Map instead or body custom model with operationId to pascal case as name like this
operationId: login
Model class -> lib/src/model/body/BodyLogin
The text was updated successfully, but these errors were encountered: