: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