#curl #openapi #cli

app oreq

The tool for interactively creating curl arguments from OpenAPI

6 releases

0.1.5 Jan 13, 2024
0.1.4 Jan 6, 2024
0.1.0 Dec 29, 2023

#1071 in Development tools

49 downloads per month

MIT license

55KB
1.5K SLoC

🔧 oreq

OpenAPI Request Prompts

The tool for interactively creating curl arguments from OpenAPI.

WIP 🚧

TODO

  • Resolve external reference

How to use

asciicast

USAGE

oreq [OPTIONS] <SCHEMA>

OPTIONS

Options:
  -b, --base-url <BASE_URL>  Base URL
  -H, --headers <HEADERS>    
  -p, --path <PATH>          Path to request
  -X, --request <METHOD>     Method to use
  -h, --help                 Print help
  -V, --version              Print version

ARGS

<SCHEMA>    OpenAPI schema path

Example

$ oreq github.yaml
> Path /repos/{owner}/{repo}
> Method GET
> owner uzimaru0000
> repo oreq
-X GET 'https://api.github.com/repos/uzimaru0000/oreq'

$ oreq github.yaml | xargs curl
> Path /repos/{owner}/{repo}
> Method GET
> 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",
    ....

Dependencies

~13–26MB
~402K SLoC