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
Copy file name to clipboardExpand all lines: modules/ROOT/pages/documentation-openapi.adoc
+5-9
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,14 @@
13
13
= API documentation with OpenAPI
14
14
15
15
MicroProfile OpenAPI is a MicroProfile community programming model for the OpenAPI specification.
16
-
MicroProfile OpenAPI helps you to generate structured documentation from your JAX-RS applications.
16
+
MicroProfile OpenAPI helps you to generate structured documentation from your Jakarta RESTful Services or JAX-RS applications.
17
17
18
18
Structured documentation helps other microservices and developers to understand and communicate with your application.
19
19
Other developers need relevant information to build an application that communicates with the REST API of your application.
20
20
MicroProfile OpenAPI facilitates this communication by generating human and machine-readable documentation on a simple interface that doesn’t require access to the source code.
21
-
You can implement MicroProfile OpenAPI for Open Liberty by enabling the feature:mpOpenAPI[display=MicroProfile OpenAPI] feature.
21
+
22
+
You can implement MicroProfile OpenAPI for Open Liberty by enabling the feature:mpOpenAPI[display=MicroProfile OpenAPI] feature. When this feature is enabled, you can view the OpenAPI document in a browser by using the `/openapi` endpoint. For example, if your browser is on the same machine where your server is running, you can view the OpenAPI document at the http://localhost:9080/openapi or the http://localhost:9080/openapi/ui URL.
23
+
22
24
23
25
The two main approaches to generate an OpenAPI document are the code-first approach and the design-first approach.
24
26
In the code-first approach, a developer can generate documentation of the REST API from the source code.
@@ -28,9 +30,6 @@ The JAX-RS framework handles basic API generation for JAX-RS annotations and gen
28
30
You can use this treemap as a starting point and augment it with annotations and code to produce a complete OpenAPI document.
29
31
Additionally, you can use this manually created documentation to generate stubs, or testable versions of code modules, such as client libraries for the API.
30
32
31
-
Some deprecated annotations were removed between Microprofile OpenAPI versions 1.1 and 2.0, which might result in breaking changes between those versions.
32
-
For more information, see the https://download.eclipse.org/microprofile/microprofile-open-api-2.0/microprofile-openapi-spec-2.0.html#release_notes_20[Release Notes for Microprofile OpenAPI 2.0].
33
-
34
33
== The code-first approach
35
34
36
35
In the code-first approach, you can initially generate basic API documentation of the REST API from annotations that are specified in the source code.
@@ -136,9 +135,6 @@ With filters, you can implement an interface in your application.
136
135
When a component of the documentation is processed, it calls your implementation and you can either add or remove content.
137
136
For more information, see https://openliberty.io/guides/microprofile-openapi.html#filtering-the-openapi-tree-elements[Filtering the OpenAPI tree elements].
138
137
139
-
== View API documentation
140
-
141
-
The OpenAPI document can be viewed in a browser by using the `/openapi` endpoint. For example, if your browser is on the same machine where your server is running, you can view the OpenAPI document at the http://localhost:9080/openapi or the http://localhost:9080/openapi/ui URL.
142
138
143
139
[#multi-module]
144
140
== Multiple application and multi-module application support with MicroProfile OpenAPI
@@ -209,8 +205,8 @@ When OpenAPI documentation from multiple modules is merged into a single documen
209
205
210
206
- If the `externalDocs` section is not the same across all documents, it is removed from the final document.
Some deprecated annotations were removed between Microprofile OpenAPI versions 1.1 and 2.0, which might result in breaking changes between those versions.
2
+
For more information, see the https://download.eclipse.org/microprofile/microprofile-open-api-2.0/microprofile-openapi-spec-2.0.html#release_notes_20[Release Notes for Microprofile OpenAPI 2.0].
Some deprecated annotations were removed between Microprofile OpenAPI versions 1.1 and 2.0, which might result in breaking changes between those versions.
2
+
For more information, see the https://download.eclipse.org/microprofile/microprofile-open-api-2.0/microprofile-openapi-spec-2.0.html#release_notes_20[Release Notes for Microprofile OpenAPI 2.0].
0 commit comments