but the generator DioNext generates no code, in which I can pass the api key in the query, only in the headers:
final _response = await _dio.request<Object>(
_path, //This is the generated path
options: _options, //Here are the headers and extras, the only place I can pass the apikey
queryParameters: _queryParameters, //Here are the queries, but I cannot pass the apikey here, only the api parameters
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
);
Here my configuration:
open api generator
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
@Openapi(
additionalProperties: AdditionalProperties(
pubName: 'apiconnection', pubAuthor: 'PeterParker'),
inputSpecFile: 'packages/apiconnection.yaml',
generatorName: Generator.dioNext,
outputDirectory: 'packages/apiconnection')
class Example extends OpenapiGeneratorConfig {}
Hi, I have an api, which requires the api key in the query, it does not accept an apikey in the headers:
but the generator DioNext generates no code, in which I can pass the api key in the query, only in the headers:
Here my configuration: open api generator
and my pubspec.yaml
Is there a solution to this problem? Thank you very much.