mirror of
https://github.com/foss42/apidash.git
synced 2025-06-30 04:46:35 +08:00
Fixes
This commit is contained in:
@ -41,9 +41,9 @@ main()
|
|||||||
String params = '';
|
String params = '';
|
||||||
if (paramsList != null) {
|
if (paramsList != null) {
|
||||||
for (var param in paramsList) {
|
for (var param in paramsList) {
|
||||||
if (param.k.isNotEmpty) {
|
if (param.name.isNotEmpty) {
|
||||||
hasParams = true;
|
hasParams = true;
|
||||||
params += '\n "${param.k}": "${param.v}",';
|
params += '\n "${param.name}": "${param.value}",';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ enum CodegenLanguage {
|
|||||||
dartHttp("Dart (http)", "dart", "dart"),
|
dartHttp("Dart (http)", "dart", "dart"),
|
||||||
kotlinOkHttp("Kotlin (okhttp3)", "java", "kt"),
|
kotlinOkHttp("Kotlin (okhttp3)", "java", "kt"),
|
||||||
pythonHttpClient("Python (http.client)", "python", "py"),
|
pythonHttpClient("Python (http.client)", "python", "py"),
|
||||||
pythonRequests("Python (requests)");
|
pythonRequests("Python (requests)", "python", "py");
|
||||||
|
|
||||||
const CodegenLanguage(this.label, this.codeHighlightLang, this.ext);
|
const CodegenLanguage(this.label, this.codeHighlightLang, this.ext);
|
||||||
final String label;
|
final String label;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'package:apidash/codegen/python/pkg_http_client.dart';
|
import 'package:apidash/codegen/python/pkg_http_client.dart';
|
||||||
import 'package:apidash/models/models.dart' show KVRow, RequestModel;
|
import 'package:apidash/models/models.dart';
|
||||||
import 'package:apidash/models/name_value_model.dart';
|
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'package:apidash/consts.dart';
|
import 'package:apidash/consts.dart';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import 'package:apidash/codegen/python/pkg_request.dart';
|
import 'package:apidash/codegen/python/pkg_request.dart';
|
||||||
import 'package:apidash/models/models.dart' show KVRow, RequestModel;
|
import 'package:apidash/models/models.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'package:apidash/consts.dart';
|
import 'package:apidash/consts.dart';
|
||||||
|
|
||||||
@ -138,11 +138,11 @@ main()""";
|
|||||||
url: 'https://jsonplaceholder.typicode.com/posts',
|
url: 'https://jsonplaceholder.typicode.com/posts',
|
||||||
method: HTTPVerb.get,
|
method: HTTPVerb.get,
|
||||||
requestParams: [
|
requestParams: [
|
||||||
KVRow('userId', 1),
|
NameValueModel(name: 'userId', value: 1),
|
||||||
],
|
],
|
||||||
requestHeaders: [
|
requestHeaders: [
|
||||||
KVRow('Custom-Header-1', 'Value-1'),
|
NameValueModel(name: 'Custom-Header-1', value: 'Value-1'),
|
||||||
KVRow('Custom-Header-2', 'Value-2')
|
NameValueModel(name: 'Custom-Header-2', value: 'Value-2')
|
||||||
],
|
],
|
||||||
id: '1',
|
id: '1',
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user