Skip to content

Commit 4f77dd7

Browse files
authored
Add openapi-fetch (openapi-ts#1098)
0 parents  commit 4f77dd7

13 files changed

+1765
-0
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test/v1.d.ts
2+
test/v1.yaml

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# openapi-fetch
2+
3+
## 0.1.1
4+
5+
### Patch Changes
6+
7+
- 5d1fb7d: Fix bad HTTP method lookup causing polymorphsim
8+
9+
## 0.1.0
10+
11+
### Minor Changes
12+
13+
- f878cd3: Add querySerializer
14+
15+
### Patch Changes
16+
17+
- 22197a1: Add missing type defs for minified build
18+
- ff3174a: Fix type inference bugs
19+
- 4ce3828: Skip parsing JSON for empty responses (#23)
20+
- ff3ae1b: Skip parsing JSON for 204 responses (#28)
21+
22+
## 0.0.8
23+
24+
### Patch Changes
25+
26+
- 8e7cb46: Fix TypeScript lib error, simplify generated types
27+
28+
## 0.0.7
29+
30+
### Patch Changes
31+
32+
- fce1546: Support "application/json;charset=utf-8" content types (#15). Thanks, [@shinzui](https://github.com/shinzui)!
33+
- 0899e0e: Add minified build (#18)
34+
35+
## 0.0.6
36+
37+
### Patch Changes
38+
39+
- 27c149c: Fix data, error sometimes returning undefined
40+
41+
## 0.0.5
42+
43+
### Patch Changes
44+
45+
- c818e65: Export BaseParams shared type (#8)
46+
47+
## 0.0.4
48+
49+
### Patch Changes
50+
51+
- ce99563: Fix optional requestBody in path
52+
53+
## 0.0.3
54+
55+
### Patch Changes
56+
57+
- b69cb51: Autocomplete URLs by path ([#2](https://github.com/drwpow/openapi-fetch/pull/2)). Thanks, [@mitchell-merry](https://github.com/mitchell-merry)!
58+
59+
## 0.0.2
60+
61+
### Patch Changes
62+
63+
- 5a47464: Fix module entry
64+
65+
## 0.0.1
66+
67+
### Patch Changes
68+
69+
- 55d7013: Encode path params

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributing
2+
3+
Thanks for being willing to contribute! 🙏
4+
5+
**Working on your first Pull Request (PR)?** [Egghead has a great free video introduction](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
6+
7+
## Open issues
8+
9+
Please check out the [the open issues](https://github.com/drwpow/openapi-fetch/issues). Issues labelled [**Help Wanted**](https://github.com/drwpow/openapi-fetch/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) and [**Good First Issue**](https://github.com/drwpow/openapi-fetch/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) are especially good to help with.
10+
11+
Contributing doesn’t have to be in code! Simply answering questions in open issues, or providing workarounds, is just as important a contribution as making pull requests.
12+
13+
## Opening a Pull Request
14+
15+
Pull requests are **welcome** for this repo! Bugfixes will always be accepted, though in some cases some small changes may be requested.
16+
17+
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](./README.md#-project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
18+
19+
### Setup
20+
21+
1. Install [pnpm](https://pnpm.io/)
22+
2. [Fork this repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and clone your copy locally
23+
3. Run `pnpm i` to install dependencies
24+
25+
### Writing code
26+
27+
Create a new branch for your PR with `git checkout -b your-branch-name`. Add the relevant code as well as docs and tests. When you push everything up (`git push`), navigate back to your repo GitHub and you should see a prompt to open a new PR.
28+
29+
While best practices for commit messages are encouraged (e.g. start with an imperative verb, keep it short, use the body if needed), this repo doesn’t follow any specific guidelines like [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). Clarity is favored over strict rules. Changelogs are generated separately from git (see [the Changelogs section](#changelogs)
30+
31+
### Writing the PR
32+
33+
**Please fill out the template!** It’s a very lightweight template 🙂.
34+
35+
### Changelogs
36+
37+
The changelog is generated via [changesets](https://github.com/changesets/changesets), and is separate from Git commit messages and pull request titles. To write a human-readable changelog for your changes, run:
38+
39+
```
40+
npx changeset
41+
```
42+
43+
This will ask if it’s a `patch`, `minor`, or `major` change ([semver](https://semver.org/)), along with a plain description of what you did. Commit this new file along with the rest of your PR, and during the next release this will go into the official changelog!
44+
45+
### CI
46+
47+
All PRs must fix lint errors, and all tests must pass. PRs will not be merged until all CI checks are “green” (✅).
48+
49+
#### Tests
50+
51+
This library uses [Vitest](https://vitest.dev/) for testing. There’s a great [VS Code extension](https://marketplace.visualstudio.com/items?itemName=ZixuanChen.vitest-explorer) you can optionally use if you’d like in-editor debugging tools.
52+
53+
To run the entire test suite, run:
54+
55+
```bash
56+
npm test
57+
```
58+
59+
To run an individual test:
60+
61+
```bash
62+
npm test -- [partial filename]
63+
```
64+
65+
To start the entire test suite in watch mode:
66+
67+
```bash
68+
npx vitest
69+
```

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Drew Powers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)