Skip to content

Commit ef2069b

Browse files
authored
Merge branch 'main' into client_cancellation
2 parents eefea86 + 1618b6c commit ef2069b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+985
-502
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214
.fvm
1315
.fvmrc

doc/dev_guide/api_endpoints_for_testing.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,28 @@ A List of API endpoints that can be used for testing API Dash
1515
#### For Testing sites with Bad Certificate
1616
- https://badssl.com/
1717
- https://www.ssl.com/sample-valid-revoked-and-expired-ssl-tls-certificates/
18+
19+
#### PDF
20+
21+
- https://training.github.com/downloads/github-git-cheat-sheet.pdf
22+
23+
#### Text
24+
25+
- https://www.google.com/robots.txt
26+
27+
#### JSON
28+
29+
- https://api.apidash.dev/openapi.json
30+
31+
#### XML
32+
33+
- https://apidash.dev/sitemap.xml
34+
35+
#### Video
36+
37+
- https://download.blender.org/peach/bigbuckbunny_movies/
38+
- https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4
39+
40+
#### Audio
41+
42+
-

doc/proposals/2025/gsoc/idea_Akshay_Waghmare_ai-agent-testing.md

Lines changed: 309 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Instructions
2+
3+
- Create a fork of API Dash.
4+
- In the folder [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) create a file named `application_<your name>_<short project name>.md`
5+
6+
The file should contain the follow:
7+
8+
```
9+
### About
10+
11+
1. Full Name
12+
3. Contact info (email, phone, etc.)
13+
6. Discord handle
14+
7. Home page (if any)
15+
8. Blog (if any)
16+
9. GitHub profile link
17+
10. Twitter, LinkedIn, other socials
18+
11. Time zone
19+
12. Link to a resume (PDF, publicly accessible via link and not behind any login-wall)
20+
21+
### University Info
22+
23+
1. University name
24+
2. Program you are enrolled in (Degree & Major/Minor)
25+
3. Year
26+
5. Expected graduation date
27+
28+
### Motivation & Past Experience
29+
30+
Short answers to the following questions (Add relevant links wherever you can):
31+
1. Have you worked on or contributed to a FOSS project before? Can you attach repo links or relevant PRs?
32+
2. What is your one project/achievement that you are most proud of? Why?
33+
3. What kind of problems or challenges motivate you the most to solve them?
34+
4. Will you be working on GSoC full-time? In case not, what will you be studying or working on while working on the project?
35+
6. Do you mind regularly syncing up with the project mentors?
36+
7. What interests you the most about API Dash?
37+
8. Can you mention some areas where the project can be improved?
38+
39+
### Project Proposal Information
40+
41+
1. Proposal Title
42+
2. Abstract: A brief summary about the problem that you will be tackling & how.
43+
3. Detailed Description
44+
4. Weekly Timeline: A rough week-wise timeline of activities that you would undertake.
45+
46+
```
47+
48+
- Feel free to add images by adding it to the `images` folder inside [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) and linking it to your doc.
49+
- Finally, send your application as a PR for review.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Instructions
2+
3+
- Create a fork of API Dash.
4+
- In the folder [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) create a file named `idea_<your name>_<short project name>.md`
5+
6+
The file should contain the following:
7+
8+
```
9+
### Initial Idea Submission
10+
11+
Full Name:
12+
University name:
13+
Program you are enrolled in (Degree & Major/Minor):
14+
Year:
15+
Expected graduation date:
16+
17+
Project Title: <Write your idea title>
18+
Relevant issues: <Add links to the relevant issues>
19+
20+
Idea description:
21+
<Write you thoughts below discussing your approach and how will you implement it>
22+
23+
```
24+
25+
- Feel free to add images by adding it to the `images` folder inside [doc/proposals/2025/gsoc](https://github.com/foss42/apidash/tree/main/doc/proposals/2025/gsoc) and linking it to your doc.
26+
- Finally, send you changes as a PR for review.

doc/user_guide/instructions_to_run_generated_code.md

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,100 @@ Here are the detailed instructions for running the generated API Dash code in **
268268

269269
## Go (net/http)
270270

271-
TODO
271+
### 1. Install Go compiler
272+
273+
- Windows and MacOS: check out the [official source](https://go.dev/doc/install)
274+
- Linux: Install from your distro's package manager.
275+
276+
Verify if go is installed:
277+
278+
```bash
279+
go version
280+
```
281+
282+
### 2. Create a project
283+
```bash
284+
go mod init example.com/api
285+
```
286+
287+
### 3. Run the generated code
288+
- Paste the generated code into `main.go`.
289+
- Build and run by `go run main.go`.
272290
273291
## JavaScript (axios)
274292
275-
TODO
293+
The generated api code can be run in browser by using the code in an html file as demonstrated below:
294+
295+
### 1. Create the html file with generated code
296+
297+
Create a new file `index.html`
298+
299+
```html
300+
<!DOCTYPE html>
301+
<html>
302+
<head>
303+
<title>Axios Example</title>
304+
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
305+
</head>
306+
<body>
307+
<script>
308+
// Paste your API Dash generated code here !!
309+
</script>
310+
</body>
311+
</html>
312+
313+
```
314+
315+
Make sure to paste the generated js code from api dash under the `<script>` tag.
316+
317+
### 2. Test with Browser Developer Tools
318+
319+
Open the `index.html` file in a modern browser and open devtools.
320+
321+
- **Chrome**: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
322+
323+
- **Firefox**: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
324+
325+
- **Edge**: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I.
326+
327+
Navigate to network tab and refresh the page to see the requests and network activity.
276328
277329
## JavaScript (fetch)
278330
279-
TODO
331+
The generated api code can be run in browser by using the code in an html file as demonstrated below:
332+
333+
### 1. Create the html file with generated code
334+
335+
Create a new file `index.html`
336+
337+
```html
338+
<!DOCTYPE html>
339+
<html>
340+
<head>
341+
<title>Fetch Example</title>
342+
</head>
343+
<body>
344+
<script>
345+
// Paste your API Dash generated code here !!
346+
</script>
347+
</body>
348+
</html>
349+
350+
```
351+
352+
Make sure to paste the generated js code from api dash under the `<script>` tag.
353+
354+
### 2. Test with Browser Developer Tools
355+
356+
Open the `index.html` file in a modern browser and open devtools.
357+
358+
- **Chrome**: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
359+
360+
- **Firefox**: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
361+
362+
- **Edge**: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I.
363+
364+
Navigate to network tab and refresh the page to see the requests and network activity.
280365
281366
## node.js (JavaScript, axios)
282367

lib/codegen/dart/dio.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'dart:convert';
22
import 'package:apidash_core/apidash_core.dart';
33
import 'package:code_builder/code_builder.dart';
4+
import 'package:pub_semver/pub_semver.dart';
45
import 'package:dart_style/dart_style.dart';
56
import 'shared.dart';
67

@@ -141,7 +142,8 @@ class DartDioCodeGen {
141142
sbf.writeln(mainFunction.accept(emitter));
142143

143144
return DartFormatter(
144-
pageWidth: contentType == ContentType.formdata ? 70 : 160)
145-
.format(sbf.toString());
145+
languageVersion: Version(3, 2, 4),
146+
pageWidth: contentType == ContentType.formdata ? 70 : 160,
147+
).format(sbf.toString());
146148
}
147149
}

lib/codegen/dart/http.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'dart:convert';
22
import 'dart:io';
33
import 'package:apidash_core/apidash_core.dart';
44
import 'package:code_builder/code_builder.dart';
5+
import 'package:pub_semver/pub_semver.dart';
56
import 'package:dart_style/dart_style.dart';
67
import 'shared.dart';
78

@@ -225,7 +226,8 @@ class DartHttpCodeGen {
225226
sbf.writeln(mainFunction.accept(emitter));
226227

227228
return DartFormatter(
228-
pageWidth: contentType == ContentType.formdata ? 70 : 160)
229-
.format(sbf.toString());
229+
languageVersion: Version(3, 2, 4),
230+
pageWidth: contentType == ContentType.formdata ? 70 : 160,
231+
).format(sbf.toString());
230232
}
231233
}

lib/screens/common_widgets/button_navbar.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ class NavbarButton extends ConsumerWidget {
7474
? Theme.of(context)
7575
.colorScheme
7676
.onSecondaryContainer
77-
: Theme.of(context)
78-
.colorScheme
79-
.onSurface
80-
.withOpacity(0.65),
77+
: Theme.of(context).colorScheme.onSurfaceVariant,
8178
),
8279
)
8380
: const SizedBox.shrink(),

lib/screens/common_widgets/editor_title.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ class EditorTitle extends StatelessWidget {
2929
tooltip: title,
3030
onSelected: onSelected,
3131
child: Ink(
32-
color: Theme.of(context)
33-
.colorScheme
34-
.secondaryContainer
35-
.withOpacity(0.3),
32+
color: Theme.of(context).colorScheme.surface,
3633
padding:
3734
const EdgeInsets.symmetric(horizontal: 12.0, vertical: 6),
3835
child: Row(

0 commit comments

Comments
 (0)