Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uzimaru0000/oreq
The tool for interactively creating curl arguments from OpenAPI.
https://github.com/uzimaru0000/oreq
cli curl openapi
Last synced: 3 months ago
JSON representation
The tool for interactively creating curl arguments from OpenAPI.
- Host: GitHub
- URL: https://github.com/uzimaru0000/oreq
- Owner: uzimaru0000
- License: mit
- Created: 2023-12-29T03:55:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-23T13:23:02.000Z (7 months ago)
- Last Synced: 2024-10-09T23:09:45.423Z (4 months ago)
- Topics: cli, curl, openapi
- Language: Rust
- Homepage:
- Size: 15.7 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
:writing_hand: oreq
OpenAPI Request Prompts
[![](https://img.shields.io/github/license/uzimaru0000/oreq?style=for-the-badge)](https://github.com/uzimaru0000/oreq/blob/master/LICENSE)
[![](https://img.shields.io/github/v/release/uzimaru0000/oreq?style=for-the-badge)](https://github.com/uzimaru0000/oreq/releases/latest)
![](https://img.shields.io/github/downloads/uzimaru0000/oreq/total?style=for-the-badge)The tool for interactively creating curl arguments from OpenAPI.
## How to use
![demo](./.github/images/demo.gif)
## Example
### Basic use case
```bash
$ oreq github.yaml
┌ Build Request
│
◇ Path
│ /repos/{owner}/{repo}
│
◇ Method
│ GET
│
◇ Path Parameters
◇ owner
│ uzimaru0000
│
◇ repo
│ oreq
│-X GET 'https://api.github.com/repos/uzimaru0000/oreq'
```### Send a request using curl
```bash
$ oreq github.yaml | xargs curl
┌ Build Request
│
◇ Path
│ /repos/{owner}/{repo}
│
◇ Method
│ GET
│
◇ Path Parameters
◇ owner
│ uzimaru0000
│
◇ repo
│ oreq
│{
"id": 736848036,
"node_id": "R_kgDOK-topA",
"name": "oreq",
"full_name": "uzimaru0000/oreq",
"private": false,
"owner": {
"login": "uzimaru0000",
"id": 13715034,
"node_id": "MDQ6VXNlcjEzNzE1MDM0",
"avatar_url": "https://avatars.githubusercontent.com/u/13715034?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/uzimaru0000",
....
```### Read schema from pipe
```bash
curl -s https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml | oreq -
┌ Build Request
│
◇ Path
│ /repos/{owner}/{repo}
│
◇ Method
│ GET
│
◇ Path Parameters
◇ owner
│ uzimaru0000
│
◇ repo
│ oreq
│-X GET 'https://api.github.com/repos/uzimaru0000/oreq'
```## USAGE
```
oreq [OPTIONS]
```### OPTIONS
```
-b, --base-url Base URL
-H, --headers
-p, --path Path to request
-X, --request Method to use
-P, --param Path parameters
-q, --query-param Query parameters
-f, --field Request body
-h, --help Print help
-V, --version Print version
```### ARGS
```
OpenAPI schema path
```## WIP :construction:
### TODO
- [ ] Resolve external reference