mirror of
https://github.com/foss42/apidash.git
synced 2025-07-15 00:52:22 +08:00
Merge branch 'main' into resolve-issue-136
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,6 +266,7 @@ 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"),
|
||||
@ -272,7 +274,12 @@ enum CodegenLanguage {
|
||||
kotlinOkHttp("Kotlin (okhttp3)", "java", "kt"),
|
||||
pythonHttpClient("Python (http.client)", "python", "py"),
|
||||
pythonRequests("Python (requests)", "python", "py"),
|
||||
javaAsyncHttpClient("Java (async-http-client)", "java", "java");
|
||||
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"),
|
||||
juliaHttp("Julia (HTTP)", "julia", "jl");
|
||||
|
||||
const CodegenLanguage(this.label, this.codeHighlightLang, this.ext);
|
||||
final String label;
|
||||
@ -283,6 +290,8 @@ enum CodegenLanguage {
|
||||
const JsonEncoder kEncoder = JsonEncoder.withIndent(' ');
|
||||
const LineSplitter kSplitter = LineSplitter();
|
||||
|
||||
const kHeaderContentType = "Content-Type";
|
||||
|
||||
const kTypeApplication = 'application';
|
||||
// application
|
||||
const kSubTypeJson = 'json';
|
||||
@ -313,12 +322,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;
|
||||
@ -500,7 +512,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.foss42.com/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