How do I access the OpenApi endpoint in WildFly 18+?

rü-

I have a war with MicroProfile OpenApi annotations. When I run it on Payara or OpenLiberty, I can access the OpenApi document at http://localhost:8080/openapi, as specified in the spec.

This does not work on WildFly 18 nor on 19 Beta 1, even though it claims to support MP OpenApi. I suppose the TCK would check for that, so maybe I'm doing something wrong.

rieckpil

It looks like the OpenAPI support was added with WildFly 19 Beta 1. Unfortunately, the current documentation on the wildfly.org page is for WildFly 18 and does not include an admin guide for including OpenAPI.

Nevertheless, you can find the .adoc file for the OpenAPI support on GitHub. Based on the history of this file, it was added in December 2019 (that's maybe why I didn't make its way to the documentation on the homepage yet).

The current documentation for OpenAPI claims to be part of the default standalone-microprofile.xml configuration and the document is available at http://localhost:8080.

If you don't run with this configuration, you can enable the OpenAPI subsystem with the following commands (which I tested with WildFly 19 Beta 1):

➜  bin ./jboss-cli.sh 
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect
[standalone@localhost:9990 /] /extension=org.wildfly.extension.microprofile.openapi-smallrye:add()
{"outcome" => "success"}

[standalone@localhost:9990 /] /subsystem=microprofile-openapi-smallrye:add()
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

[standalone@localhost:9990 /] 

Please note: If you then try to access it at http://localhost:8080/openapi in your browser, you might get a 406 - Not Acceptable. Just request it the correct content-type or using cURL:

curl -v http://localhost:8080/openapi // YAML output
curl -v http://localhost:8080/openapi?format=JSON  // JSON output

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do I get access to HTTP error body using a OpenAPI Generator Client SDK

How do I specify a multifile upload in OpenAPI?

How do I shutdown JBoss Wildfly when I can't access the CLI tool?

How can I access to my app with WildFly

How to support multiple i18n endpoint in Aurelia?

How do I access API endpoint on same network but different machine from Android Emulator?

How do I connect a STOMP client to Wildfly?

Wildfly 9 - How do I exclude Jackson

How do I set an endpoint for a CAKeyFrameAnimation?

How do I integration test a SoapCore endpoint?

How Do I Create A Temporary Endpoint In Express

How do I define my endpoint?

How do I combine multiple OpenAPI 3 specification files together?

How to access a field of a schema in OpenAPI?

How to access Twitter's OpenAPI?

How do I use 'useEffect' in React 18

How do I activate the AJP port on Wildfly 11?

How do I get Wildfly to use additional Jackson Datatypes?

How do I undeploy all artifacts from WildFly?

how can i do for an MDB to deploy last on my wildfly

How do I make JNDI names compatible with both GlassFish and WildFly

How do I enable on-the-fly compilation of JSPs in Wildfly 9?

How do I specify a Wildfly server version when using wildfly-maven-plugin?

How to specify an endpoint's authorization is optional in openapi v3?

How to build and return an OpenApi 3.0 Document programmatically in a Spring GET endpoint?

How do I use the Address formats in i18napis?

How do I block calls to a specific endpoint in EC2?

How do I surf via a VPN and have a home VPN endpoint?

How do I remove jar filename before endpoint's url?