Skip to content

Commit d45d9df

Browse files
authored
docs: run VSCode formatter, fix TOC (#438)
* docs: run VSCode formatter, fix TOC * chore: ripping out TOC GitHub has native support for these: https://github.blog/changelog/2021-04-13-table-of-contents-support-in-markdown-files/
1 parent f0b9d11 commit d45d9df

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

README.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,16 @@
66

77
`rdme` is the CLI wrapper for [ReadMe's RESTful API](https://docs.readme.com/reference/intro-to-the-readme-api). It allows you to upload and edit [OpenAPI](https://swagger.io/specification/) and [Swagger](https://swagger.io/specification/v2/) files associated with projects you create on [ReadMe](https://readme.com/). Additionally, you can sync documentation with your project, and manage project versions.
88

9-
* [Configuration](#installation)
10-
* [Installation](#installation)
11-
* [Authentication](#authentication)
12-
* [Usage](#usage)
13-
* [Common options](#common-rdme-options)
14-
* [OpenAPI / Swagger](#openapi--swagger)
15-
* [Docs](#docs)
16-
* [Versions](#versions)
17-
* [Opening a Project](#open)
18-
* [Future](#future)
19-
209
## Configuration
10+
2111
### Installation
12+
2213
```sh
2314
npm install rdme
2415
```
2516

2617
### Authentication
18+
2719
If you authenticate `rdme` to your ReadMe project, we will save your API key to a local configuration file (`~/.config/configstore/rdme-production.json`) so you will not have to provide the `--key` option to commands that require it.
2820

2921
```sh
@@ -33,34 +25,40 @@ rdme login
3325
`rdme whoami` is also available to you to determine who you are logged in as, and to what project, as well as `rdme logout` for logging out of that account.
3426

3527
## Usage
28+
3629
If you wish to get more information about any command within `rdme`, you can execute `rdme help <command>` or `rdme <command> --help`. You an also execute `rdme help` to see a global list of commands that `rdme` offers.
3730

3831
### Common `rdme` Options
39-
* `--key <string>`: The API key associated with your ReadMe project. You can obtain this from your dashboard, or alternatively if you log in with `rdme login`, we will save your API key to a local configuration file (`~/.config/configstore/rdme-production.json`), saving you the hassle of having to supply this argument on commands that have it.
40-
* `--version <string>`: Your project version.
32+
33+
- `--key <string>`: The API key associated with your ReadMe project. You can obtain this from your dashboard, or alternatively if you log in with `rdme login`, we will save your API key to a local configuration file (`~/.config/configstore/rdme-production.json`), saving you the hassle of having to supply this argument on commands that have it.
34+
- `--version <string>`: Your project version.
4135

4236
### OpenAPI / Swagger
37+
4338
ReadMe supports [OpenAPI 3.0](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md), [OpenAPI 3.1](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md), and [Swagger 2.x](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md).
4439

4540
The following examples use JSON files, but we support API Definitions that are written in either JSON or YAML.
4641

4742
> ℹ️ Note that the `rdme openapi` command supports both OpenAPI and Swagger API definitions. The `rdme swagger` command is an alias for `rdme openapi` and is deprecated.
4843
4944
#### Uploading a New API Definition to ReadMe
45+
5046
This will upload `path-to-openapi.json` to your project and return an ID and URL for you to later update your file, and view it in the client.
5147

5248
```sh
5349
rdme openapi [path-to-file.json]
5450
```
5551

5652
#### Editing (Re-Syncing) an Existing API Definition
53+
5754
This will edit (re-sync) an existing API definition (identified by `--id`) within your ReadMe project.
5855

5956
```sh
6057
rdme openapi [path-to-file.json] --id={existing-id}
6158
```
6259

6360
#### Uploading or Editing an API Definition in a Project Version
61+
6462
You can additional include a version flag, specifying the target version for your file's destination
6563

6664
```sh
@@ -72,51 +70,61 @@ rdme openapi [path-to-file.json] --id={existing-id} --version={project-version}
7270
```
7371

7472
#### Omitting the File Path
73+
7574
If you run `rdme` within a directory that contains your OpenAPI or Swagger definition, you can omit the file path. We will then look for a file with the following names, and upload that: `openapi.json`, `openapi.yaml`, `swagger.json`, and `swagger.yaml`.
7675

7776
```sh
7877
rdme openapi
7978
```
8079

8180
#### Validating an API Definition
81+
8282
You can also perform a local validation of your API definition without uploading it to ReadMe, which can be useful when constructing or editing your API definition.
8383

8484
```sh
8585
rdme validate [path-to-file.json]
8686
```
8787

8888
### Docs
89+
8990
#### Syncing a Folder of Markdown Docs to ReadMe
91+
9092
```sh
9193
rdme docs path-to-markdown-files --version={project-version}
9294
```
9395

9496
#### Edit a Single ReadMe Doc on Your Local Machine
97+
9598
```sh
9699
rdme docs:edit <slug> --version={project-version}
97100
```
98101

99102
### Versions
103+
100104
#### Get All Versions Associated With Your Project
105+
101106
```sh
102107
rdme versions
103108
```
104109

105-
If you wish to see the raw JSON output from our API in this response, supply the `--raw` flag.
110+
If you wish to see the raw JSON output from our API in this response, supply the `--raw` flag.
106111

107112
#### Get All Information About a Particular Version
113+
108114
```sh
109115
rdme versions --version={project-version}
110116
```
111117

112-
If you wish to see the raw JSON output from our API in this response, supply the `--raw` flag.
118+
If you wish to see the raw JSON output from our API in this response, supply the `--raw` flag.
113119

114120
#### Create a New Version
121+
115122
```sh
116123
rdme versions:create <version> | --version={project-version}
117124
```
118125

119126
##### Create a New Version
127+
120128
If you wish to automate the process of creating a new project version, and not have the CLI prompt you for input, you can do so by supplying the necessary flags to `versions:create`.
121129

122130
For example:
@@ -128,25 +136,29 @@ rdme versions:create <version> | --version={project-version} --fork={version-for
128136
See `rdme versions:create --help` for a full list of flags.
129137

130138
#### Update a Version
139+
131140
```sh
132141
rdme versions:update --version={project-version}
133142
```
134143

135144
Like `versions:create`, if you wish to automate this process and not be blocked by CLI input, you can supply the necessary flags to this command. See `rdme versions:update --help` for more information.
136145

137146
#### Delete a Version
147+
138148
You can remove a specific version from your project, as well as all of the attached specs
139149

140150
```sh
141151
rdme versions:delete --version={project-version}
142152
```
143153

144154
### Open Your ReadMe Project in Your Browser
155+
145156
If you are logged in, this will open the project in your browser:
146157

147158
```sh
148159
rdme open
149160
```
150161

151162
## Future
163+
152164
We are continually expanding and improving the offerings of this application as we expand our public API and are able. Some interactions may change over time, but we will do our best to retain backwards compatibility.

0 commit comments

Comments
 (0)