mirror of
https://github.com/foss42/apidash.git
synced 2025-06-28 11:27:06 +08:00
Updated Python into the Language Dropdown
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import 'package:apidash/codegen/kotlin/pkg_okhttp.dart';
|
||||
import 'package:apidash/codegen/python/pkg_request.dart';
|
||||
import 'package:apidash/consts.dart';
|
||||
|
||||
import 'package:apidash/models/models.dart' show RequestModel;
|
||||
@ -15,6 +16,8 @@ class Codegen {
|
||||
return DartHttpCodeGen().getCode(requestModel, defaultUriScheme);
|
||||
case CodegenLanguage.kotlinOkHttp:
|
||||
return KotlinOkHttpCodeGen().getCode(requestModel);
|
||||
case CodegenLanguage.pythonRequests:
|
||||
return PythonRequestCodeGen().getCode(requestModel, defaultUriScheme);
|
||||
default:
|
||||
throw ArgumentError('Invalid codegenLanguage');
|
||||
}
|
||||
|
@ -230,6 +230,7 @@ const kDefaultContentType = ContentType.json;
|
||||
|
||||
enum CodegenLanguage {
|
||||
dartHttp("Dart (http)"),
|
||||
pythonRequests("Python (requests)"),
|
||||
kotlinOkHttp("Kotlin (OkHttp)");
|
||||
|
||||
const CodegenLanguage(this.label);
|
||||
|
Reference in New Issue
Block a user