Skip to content

Commit 772eb22

Browse files
committed
Sync documentation of main branch
1 parent 532efd2 commit 772eb22

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

_versions/main/guides/openapi-swaggerui.adoc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public class FruitResourceTest {
165165
Quarkus provides the https://github.com/smallrye/smallrye-open-api/[SmallRye OpenAPI] extension compliant with the
166166
https://github.com/eclipse/microprofile-open-api/[MicroProfile OpenAPI]
167167
specification in order to generate your API
168-
https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md[OpenAPI v3 specification].
168+
https://spec.openapis.org/oas/v3.1.0.html[OpenAPI v3 specification].
169169

170170
You just need to add the `openapi` extension to your Quarkus application:
171171

@@ -198,7 +198,7 @@ Once your application is started, you can make a request to the default `/q/open
198198
[source,shell]
199199
----
200200
$ curl http://localhost:8080/q/openapi
201-
openapi: 3.0.3
201+
openapi: 3.1.0
202202
info:
203203
title: Generated API
204204
version: "1.0"
@@ -359,7 +359,7 @@ Remember that setting fields on the schema will override what has been generated
359359

360360
=== Runtime filters
361361

362-
Runtime filters by default runs on startup (when the final OpenAPI document gets created). You can change runtime filters to run on every request, making the openapi document dynamic.
362+
Runtime filters by default runs on startup (when the final OpenAPI document gets created). You can change runtime filters to run on every request, making the OpenAPI document dynamic.
363363
To do this you need to set this propery: `quarkus.smallrye-openapi.always-run-filter=true`.
364364

365365
== Loading OpenAPI Schema From Static Files
@@ -373,7 +373,7 @@ Quarkus also supports alternative <<open-document-paths,OpenAPI document paths>>
373373

374374
[source,yaml]
375375
----
376-
openapi: 3.0.1
376+
openapi: 3.1.0
377377
info:
378378
title: Static OpenAPI document of fruits resource
379379
description: Fruit resources Open API documentation
@@ -446,16 +446,23 @@ Live reload of static OpenAPI document is supported during development. A modifi
446446

447447
== Changing the OpenAPI version
448448

449-
By default, when the document is generated, the OpenAPI version used will be `3.0.3`. If you use a static file as mentioned above, the version in the file
449+
By default, when the document is generated, the OpenAPI version used will be `3.1.0`. If you use a static file as mentioned above, the version in the file
450450
will be used. You can also define the version in SmallRye using the following configuration:
451451

452452
[source, properties]
453453
----
454-
mp.openapi.extensions.smallrye.openapi=3.0.2
454+
mp.openapi.extensions.smallrye.openapi=3.0.4
455455
----
456456

457457
This might be useful if your API goes through a Gateway that needs a certain version.
458458

459+
[NOTE]
460+
====
461+
Changing the OpenAPI version between `3.0.x` and `3.1.x` versions will result in changes to the rendered document to satisfy the requirements
462+
of the chosen version. A good starting point to learn about the differences between OpenAPI 3.0 and 3.1 is the
463+
https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0[OpenAPI Initiative].
464+
====
465+
459466
== Auto-generation of Operation Id
460467

461468
The https://swagger.io/docs/specification/paths-and-operations/[Operation Id] can be set using the `@Operation` annotation, and is in many cases useful when using a tool to generate a client stub from the schema.

0 commit comments

Comments
 (0)