October 26, 2018

How to Generate WADL in JBoss EAP 7

The bad news there is no supported way. The best you can get is by CLI.

/deployment=example-javaee7.war/subsystem=jaxrs:read-resource(include-defaults=true, include-runtime=true, recursive=true)
{
    "outcome" => "success",
    "result" => {"rest-resource" => {"se.magnuskkarlsson.person.boundary.PersonResource" => {
        "resource-class" => "se.magnuskkarlsson.person.boundary.PersonResource",
        "rest-resource-paths" => [{
            "resource-path" => "/person",
            "consumes" => undefined,
            "produces" => undefined,
            "java-method" => "java.lang.String se.magnuskkarlsson.person.boundary.PersonResource.hello()",
            "resource-methods" => ["GET /example-javaee7/rest/person"]
        }],
        "sub-resource-locators" => undefined
    }}}
}

You can replace you application name with wildcard to make the expression generic. '/deployment=*/subsystem=jaxrs:read-resource(include-defaults=true, include-runtime=true, recursive=true)'

The other option is using org.jboss.resteasy.wadl.ResteasyWadlServlet, but I did not get that to work with EAP 7.1.0, but the idea of modifying your war seems the wrong way to do it.

Reference:

No comments: