mirror of
https://github.com/foss42/apidash.git
synced 2025-06-04 17:37:05 +08:00
Merge branch 'main' of https://github.com/foss42/apidash into add-rust-curl-codegen
This commit is contained in:
@ -8,6 +8,7 @@ import 'package:davi/davi.dart';
|
||||
const kDiscordUrl = "https://bit.ly/heyfoss";
|
||||
const kGitUrl = "https://github.com/foss42/apidash";
|
||||
const kIssueUrl = "$kGitUrl/issues";
|
||||
const kDefaultUri = "api.apidash.dev";
|
||||
|
||||
final kIsMacOS = !kIsWeb && Platform.isMacOS;
|
||||
final kIsWindows = !kIsWeb && Platform.isWindows;
|
||||
@ -265,15 +266,23 @@ enum CodegenLanguage {
|
||||
har("HAR", "json", "har"),
|
||||
dartHttp("Dart (http)", "dart", "dart"),
|
||||
dartDio("Dart (dio)", "dart", "dart"),
|
||||
goHttp("Go (http)", "go", "go"),
|
||||
jsAxios("JavaScript (axios)", "javascript", "js"),
|
||||
jsFetch("JavaScript (fetch)", "javascript", "js"),
|
||||
nodejsAxios("node.js (axios)", "javascript", "js"),
|
||||
nodejsFetch("node.js (fetch)", "javascript", "js"),
|
||||
kotlinOkHttp("Kotlin (okhttp3)", "java", "kt"),
|
||||
pythonHttpClient("Python (http.client)", "python", "py"),
|
||||
pythonRequests("Python (requests)", "python", "py"),
|
||||
rustCurl("Rust (curl-rust)", "rust", "rs");
|
||||
|
||||
pythonHttpClient("Python (http.client)", "python", "py"),
|
||||
rustActix("Rust (Actix Client)", "rust", "rs"),
|
||||
rustReqwest("Rust (reqwest)", "rust", "rs"),
|
||||
rustCurl("Rust (curl-rust)", "rust", "rs"),
|
||||
rustUreq("Rust (ureq)", "rust", "rs"),
|
||||
javaOkHttp("Java (okhttp3)", "java", 'java'),
|
||||
javaAsyncHttpClient("Java (asynchttpclient)", "java", "java"),
|
||||
javaHttpClient("Java (HttpClient)", "java", "java"),
|
||||
juliaHttp("Julia (HTTP)", "julia", "jl"),
|
||||
phpGuzzle("PHP (guzzle)", "php", "php");
|
||||
|
||||
const CodegenLanguage(this.label, this.codeHighlightLang, this.ext);
|
||||
final String label;
|
||||
@ -284,6 +293,8 @@ enum CodegenLanguage {
|
||||
const JsonEncoder kEncoder = JsonEncoder.withIndent(' ');
|
||||
const LineSplitter kSplitter = LineSplitter();
|
||||
|
||||
const kHeaderContentType = "Content-Type";
|
||||
|
||||
const kTypeApplication = 'application';
|
||||
// application
|
||||
const kSubTypeJson = 'json';
|
||||
@ -314,12 +325,15 @@ const kSubTypeSvg = 'svg+xml';
|
||||
const kTypeAudio = 'audio';
|
||||
const kTypeVideo = 'video';
|
||||
|
||||
const kTypeMultipart = "multipart";
|
||||
const kSubTypeFormData = "form-data";
|
||||
|
||||
const kSubTypeDefaultViewOptions = 'all';
|
||||
|
||||
enum ContentType {
|
||||
json("$kTypeApplication/$kSubTypeJson"),
|
||||
text("$kTypeText/$kSubTypePlain"),
|
||||
formdata("multipart/form-data");
|
||||
formdata("$kTypeMultipart/$kSubTypeFormData");
|
||||
|
||||
const ContentType(this.header);
|
||||
final String header;
|
||||
@ -501,8 +515,7 @@ const kRaiseIssue =
|
||||
const kCsvError =
|
||||
"There seems to be an issue rendering this CSV. Please raise an issue in API Dash GitHub repo so that we can resolve it.";
|
||||
|
||||
const kHintTextUrlCard =
|
||||
"Enter API endpoint like api.apidash.dev/country/codes";
|
||||
const kHintTextUrlCard = "Enter API endpoint like https://$kDefaultUri/";
|
||||
const kLabelPlusNew = "+ New";
|
||||
const kLabelSend = "Send";
|
||||
const kLabelSending = "Sending..";
|
||||
|
Reference in New Issue
Block a user