From 2c3c2003cbf7195825266ac9017bdf83460dfe8e Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Tue, 27 Feb 2024 12:17:14 +0100 Subject: [PATCH] docs: update README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 5457b8a..25dffec 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,26 @@ const file = `{ const result = await resolve(file) ``` +## Upgrade your OpenAPI specification + +There’s an `upgrade` command to upgrade all your OpenAPI specifications to the latest OpenAPI version. + +> ⚠️ Currently, only an upgrade from OpenAPI 3.0 to OpenAPI 3.1 is supported. Swagger 2.0 is not supported (yet). + +```ts +const specification = openapi() + .load({ + openapi: '3.0.0', + info: { + title: 'Hello World', + version: '1.0.0', + }, + paths: {}, + }) + .upgrade() + .get() +``` + ## Community We are API nerds. You too? Let’s chat on Discord: