You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You just need to add the `openapi` extension to your Quarkus application:
171
171
@@ -198,7 +198,7 @@ Once your application is started, you can make a request to the default `/q/open
198
198
[source,shell]
199
199
----
200
200
$ curl http://localhost:8080/q/openapi
201
-
openapi: 3.0.3
201
+
openapi: 3.1.0
202
202
info:
203
203
title: Generated API
204
204
version: "1.0"
@@ -359,7 +359,7 @@ Remember that setting fields on the schema will override what has been generated
359
359
360
360
=== Runtime filters
361
361
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.
363
363
To do this you need to set this propery: `quarkus.smallrye-openapi.always-run-filter=true`.
364
364
365
365
== Loading OpenAPI Schema From Static Files
@@ -373,7 +373,7 @@ Quarkus also supports alternative <<open-document-paths,OpenAPI document paths>>
373
373
374
374
[source,yaml]
375
375
----
376
-
openapi: 3.0.1
376
+
openapi: 3.1.0
377
377
info:
378
378
title: Static OpenAPI document of fruits resource
379
379
description: Fruit resources Open API documentation
@@ -446,16 +446,23 @@ Live reload of static OpenAPI document is supported during development. A modifi
446
446
447
447
== Changing the OpenAPI version
448
448
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
450
450
will be used. You can also define the version in SmallRye using the following configuration:
451
451
452
452
[source, properties]
453
453
----
454
-
mp.openapi.extensions.smallrye.openapi=3.0.2
454
+
mp.openapi.extensions.smallrye.openapi=3.0.4
455
455
----
456
456
457
457
This might be useful if your API goes through a Gateway that needs a certain version.
458
458
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
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