diff --git a/lib/codegen/codegen.dart b/lib/codegen/codegen.dart index e2038a27..7c66b88f 100644 --- a/lib/codegen/codegen.dart +++ b/lib/codegen/codegen.dart @@ -46,12 +46,8 @@ class Codegen { return DartHttpCodeGen().getCode(rM); case CodegenLanguage.dartDio: return DartDioCodeGen().getCode(rM); - case CodegenLanguage.javaAsyncHttpClient: - return JavaAsyncHttpClientGen().getCode(rM); - case CodegenLanguage.javaHttpClient: - return JavaHttpClientCodeGen().getCode(rM); - case CodegenLanguage.javaOkHttp: - return JavaOkHttpCodeGen().getCode(rM); + case CodegenLanguage.goHttp: + return GoHttpCodeGen().getCode(rM); case CodegenLanguage.jsAxios: return AxiosCodeGen().getCode(rM); case CodegenLanguage.jsFetch: @@ -60,10 +56,16 @@ class Codegen { return AxiosCodeGen(isNodeJs: true).getCode(rM); case CodegenLanguage.nodejsFetch: return FetchCodeGen(isNodeJs: true).getCode(rM); + case CodegenLanguage.javaAsyncHttpClient: + return JavaAsyncHttpClientGen().getCode(rM); + case CodegenLanguage.javaHttpClient: + return JavaHttpClientCodeGen().getCode(rM); + case CodegenLanguage.javaOkHttp: + return JavaOkHttpCodeGen().getCode(rM); + case CodegenLanguage.juliaHttp: + return JuliaHttpClientCodeGen().getCode(rM); case CodegenLanguage.kotlinOkHttp: return KotlinOkHttpCodeGen().getCode(rM); - case CodegenLanguage.phpGuzzle: - return PhpGuzzleCodeGen().getCode(rM); case CodegenLanguage.pythonHttpClient: return PythonHttpClientCodeGen() .getCode(rM, boundary: boundary ?? getNewUuid()); @@ -75,10 +77,8 @@ class Codegen { return RustReqwestCodeGen().getCode(rM); case CodegenLanguage.rustUreq: return RustUreqCodeGen().getCode(rM, boundary: boundary); - case CodegenLanguage.goHttp: - return GoHttpCodeGen().getCode(rM); - case CodegenLanguage.juliaHttp: - return JuliaHttpClientCodeGen().getCode(rM); + case CodegenLanguage.phpGuzzle: + return PhpGuzzleCodeGen().getCode(rM); } } } diff --git a/lib/consts.dart b/lib/consts.dart index ebbf4604..3222a75b 100644 --- a/lib/consts.dart +++ b/lib/consts.dart @@ -272,17 +272,17 @@ enum CodegenLanguage { nodejsAxios("node.js (axios)", "javascript", "js"), nodejsFetch("node.js (fetch)", "javascript", "js"), kotlinOkHttp("Kotlin (okhttp3)", "java", "kt"), - phpGuzzle("PHP (guzzle)", "php", "php"), - pythonHttpClient("Python (http.client)", "python", "py"), pythonRequests("Python (requests)", "python", "py"), + pythonHttpClient("Python (http.client)", "python", "py"), rustActix("Rust (Actix Client)", "rust", "rs"), rustReqwest("Rust (reqwest)", "rust", "rs"), rustUreq("Rust (ureq)", "rust", "rs"), javaOkHttp("Java (okhttp3)", "java", 'java'), javaAsyncHttpClient("Java (async-http-client)", "java", "java"), javaHttpClient("Java (HttpClient)", "java", "java"), - juliaHttp("Julia (HTTP)", "julia", "jl"); - + juliaHttp("Julia (HTTP)", "julia", "jl"), + phpGuzzle("PHP (guzzle)", "php", "php"); + const CodegenLanguage(this.label, this.codeHighlightLang, this.ext); final String label; final String codeHighlightLang;