Skip to content

Commit 86fc8d3

Browse files
julianchealphilsturgeon
authored andcommitted
Guide: Rewrite Rails
1 parent 40c1a00 commit 86fc8d3

File tree

2 files changed

+104
-81
lines changed

2 files changed

+104
-81
lines changed

openapi/frameworks/laravel.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,17 @@ Let's take a look at the resulting OpenAPI for the request body now:
746746

747747
As you can see, a lot more information is provided which will help anyone who wants to interact with this API.
748748

749+
## Upgrading to OpenAPI v3.1
750+
751+
Update Scribe to v5.6.0 or later and set the OpenAPI version in `config/scribe.php`:
752+
753+
```php
754+
'openapi' => [
755+
'version' => '3.1.3',
756+
```
757+
758+
This will generate an OpenAPI v3.1 document, which has several advantages over v3.0, including support for JSON Schema, better handling of nullable types, and improved support for webhooks.
759+
749760
## Summary
750761

751-
Generating an OpenAPI specification for your Laravel API is a great way to improve developer experience and streamline API consumption after the API has been built. When API design-first is not an option, "catching up" with Scribe means you can quickly get to the point of having a complete OpenAPI document that can be used in tools like Speakeasy to generate SDKs, tests, and more.
762+
When API design-first is not an option, "catching up" with Scribe means you can quickly get to the point of having a complete OpenAPI document without having to duplicate a lot of information. Let the code do the talking, and enable tools like Speakeasy to generate SDKs, tests, and more.

0 commit comments

Comments
 (0)