oreq 0.2.5

The tool for interactively creating curl arguments from OpenAPI.
Documentation

How to use

demo

USAGE

oreq [OPTIONS] <SCHEMA>

OPTIONS

-b, --base-url <BASE_URL>        Base URL
-H, --headers <HEADERS>
-p, --path <PATH>                Path to request
-X, --request <METHOD>           Method to use
-P, --param <PATH_PARAM>         Path parameters
-q, --query-param <QUERY_PARAM>  Query parameters
-f, --field <FIELD>              Request body
-h, --help                       Print help
-V, --version                    Print version

ARGS

<SCHEMA>    OpenAPI schema path

Example

Basic use case

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

Send a request using curl

$ 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",
    ....

Read schema from pipe

curl -s https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml | oreq -
> Path /repos/{owner}/{repo}
> Method GET
> owner uzimaru0000
> repo oreq
-X GET 'https://api.github.com/repos/uzimaru0000/oreq'

WIP :construction:

TODO

  • Resolve external reference