-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
7654-Documentation-MicroProfile-OpenAPI-4.0-8
7654-Documentation-MicroProfile-OpenAPI-4.0-8 #7654
- Loading branch information
1 parent
f670f4a
commit e49db24
Showing
5 changed files
with
110 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,36 +32,34 @@ For example, the following configuration is for the `sample_app` application, wh | |
|
||
- The `<info>` element sets the info section for the final OpenAPI document, which documents web modules 1, 2, and 4. | ||
|
||
For more information, see xref:ROOT:documentation-openapi.adoc#multi-module[Multiple application and multi-module application support with MicroProfile OpenAPI] | ||
|
||
==== Naming applications and modules | ||
|
||
=== mpOpenAPI-4.0 - Will be placed in another doc (Placed here for REVIEW) | ||
- The application name is determined by the value of the `name` attribute when the application is deployed in `server.xml` using `application`, `webApplication`, or `enterpriseApplication`. For example: | ||
+ | ||
[source,xml] | ||
---- | ||
<webApplication name="application1" location="application1-v1.war" /> | ||
---- | ||
+ | ||
If the application is deployed in the `dropins` directory or if the `name` attribute is not specified, the name defaults to the archive filename with the extension removed. | ||
+ | ||
- The module name is specified in the web module's `web.xml` file. If there is no `web.xml` file or if it does not specify a name, the module name defaults to the filename with the extension removed. | ||
|
||
By default, all deployed applications and modules are included in the OpenAPI documentation. However, you can configure which applications and modules should be included. | ||
==== Override Info | ||
|
||
For example, the following configuration is for the `sample_app` application, which consists of an `EAR` file containing five web modules. | ||
You can also override the `info` section of the OpenAPI document using the following configuration: | ||
|
||
[source,xml] | ||
---- | ||
<mpOpenAPI> | ||
<excludeModule>sample_app/module-3</excludeModule> | ||
<excludeModule>sample_app/module-5</excludeModule> | ||
<info title="A multi-module sample application" | ||
description="This is a sample application." | ||
version="2.0.1" | ||
termsOfService="http://example.com/sample_app/terms" | ||
contactName="API Support" | ||
contactUrl="http://www.example.com/sample_app/support" | ||
contactEmail="[email protected]" | ||
licenseName="License 2.0" | ||
licenseUrl="https://www.example.org/licenses/LICENSE-2.0.html" | ||
/> | ||
<info title="Example API" | ||
version="1.0" | ||
description="This is an example API"/> | ||
</mpOpenAPI> | ||
---- | ||
|
||
- The `<excludeModule>` elements exclude the `module-3` and `module-5` web modules. | ||
|
||
- The `<info>` element sets the info section for the final OpenAPI document, which documents web modules 1, 2, and 4. | ||
Overriding the `info` section is useful for documenting multiple modules or applications. Without an override, the `info` section can be replaced with a standard version which indicates that documentation from several modules was merged. | ||
|
||
For more information, see xref:ROOT:documentation-openapi.adoc#multi-module[Multiple application and multi-module application support with MicroProfile OpenAPI] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters