Skip to content

Commit e509dc4

Browse files
committed
Update README for auto docs
1 parent 1690302 commit e509dc4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

readme.md

+24
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Features
6060
- Delete Account
6161
- CSRF protection
6262
- **API Examples**: Facebook, Foursquare, Last.fm, Tumblr, Twitter, Stripe, LinkedIn and more.
63+
- **Automatic Documentation**
6364

6465
Prerequisites
6566
-------------
@@ -72,6 +73,7 @@ Prerequisites
7273
- <img src="https://lh5.googleusercontent.com/-2YS1ceHWyys/AAAAAAAAAAI/AAAAAAAAAAc/0LCb_tsTvmU/s46-c-k/photo.jpg" height="17">&nbsp;**Ubuntu** / <img src="https://upload.wikimedia.org/wikipedia/commons/3/3f/Logo_Linux_Mint.png" height="17">&nbsp;**Linux Mint:** `sudo apt-get install build-essential`
7374
- <img src="http://i1-news.softpedia-static.com/images/extra/LINUX/small/slw218news1.png" height="17">&nbsp;**Fedora**: `sudo dnf groupinstall "Development Tools"`
7475
- <img src="https://en.opensuse.org/images/b/be/Logo-geeko_head.png" height="17">&nbsp;**OpenSUSE:** `sudo zypper install --type pattern devel_basis`
76+
- <img src="https://global-uploads.webflow.com/5ea1b599e88dc9edc465e8f5/5ea8b30dd43a0b44bbc91bd8_favicon-32x32.png" height="17">&nbsp;**Optic:** `npm install -g @useoptic/cli` (needed for automatic documentation)
7577

7678
**Note:** If you are new to Laravel, I recommend to watch
7779
[Laravel From Scratch](https://laracasts.com/series/laravel-5-from-scratch) screencast by Jeffery Way that teaches Laravel 5 from scratch. Alternatively,
@@ -435,6 +437,28 @@ Recommended Laravel Libraries
435437
- [laravel-emoji](https://github.com/unicodeveloper/laravel-emoji) - For using emojis in your app
436438
- [laravel-quotes](https://github.com/unicodeveloper/laravel-quotes) - For using all sorts of quotes especially DJKHALED in your app
437439

440+
Enabling Automatic Documentation
441+
-----------------------------
442+
Using [Optic](https://github.com/opticdev/optic), you can use your API like normal, automatically documenting changes in behavior. To enable this, you'll first need to download Optic.
443+
444+
```bash
445+
npm install -g @useoptic/cli
446+
```
447+
448+
Once you've installed Optic, you can start documenting your requests by running `api start`. Running this command will create a proxied version of your api, available at [localhost:4000](http://localhost:4000) - now, you can use the API like normal here, and Optic will automatically notice differences in the documented behavior, allowing you to automatically create documentation as your API changes.
449+
450+
To view the current documentation of the api, run `api spec` at the root directory.
451+
452+
#### Useful Commands
453+
454+
```bash
455+
api start # use this to start monitoring your API
456+
api spec # use this to inspect the current documentation of your API
457+
api generate:oas # generates an OpenAPI specification for your currently documented API
458+
```
459+
460+
For more information about Optic, [check out the docs](https://docs.useoptic.com).
461+
438462

439463
FAQ
440464
---

0 commit comments

Comments
 (0)