kandi background
Explore Kits

wadl-tools | For example generate | Model View Controller library

 by   autentia Java Version: Current License: Apache-2.0

 by   autentia Java Version: Current License: Apache-2.0

Download this library from

kandi X-RAY | wadl-tools Summary

wadl-tools is a Java library typically used in Architecture, Model View Controller, Spring Boot, Spring applications. wadl-tools has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. However wadl-tools has 8 bugs. You can download it from GitHub.
This project is a set of libraries to generate the WADL of REST services implemented with Spring Web MVC.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • wadl-tools has a low active ecosystem.
  • It has 25 star(s) with 12 fork(s). There are 9 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 4 open issues and 0 have been closed. On average issues are closed in 1815 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of wadl-tools is current.
wadl-tools Support
Best in #Model View Controller
Average in #Model View Controller
wadl-tools Support
Best in #Model View Controller
Average in #Model View Controller

quality kandi Quality

  • wadl-tools has 8 bugs (0 blocker, 0 critical, 3 major, 5 minor) and 177 code smells.
wadl-tools Quality
Best in #Model View Controller
Average in #Model View Controller
wadl-tools Quality
Best in #Model View Controller
Average in #Model View Controller

securitySecurity

  • wadl-tools has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • wadl-tools code analysis shows 0 unresolved vulnerabilities.
  • There are 1 security hotspots that need review.
wadl-tools Security
Best in #Model View Controller
Average in #Model View Controller
wadl-tools Security
Best in #Model View Controller
Average in #Model View Controller

license License

  • wadl-tools is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
wadl-tools License
Best in #Model View Controller
Average in #Model View Controller
wadl-tools License
Best in #Model View Controller
Average in #Model View Controller

buildReuse

  • wadl-tools releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • wadl-tools saves you 2535 person hours of effort in developing the same functionality from scratch.
  • It has 5512 lines of code, 575 functions and 115 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
wadl-tools Reuse
Best in #Model View Controller
Average in #Model View Controller
wadl-tools Reuse
Best in #Model View Controller
Average in #Model View Controller
Top functions reviewed by kandi - BETA

kandi has reviewed wadl-tools and discovered the below as its top functions. This is intended to give you an instant insight into wadl-tools implemented functionality, and help decide if they suit your requirements.

  • Discover the prefix for a class .
  • Build all parameters from the method .
  • Compose the grammar file name with the grammar file .
  • Builds a collection of resources .
  • Extracts wADL from uri .
  • Build a query param
  • Build the class type for a given class .
  • Try to build the schema from JAXB annotated class .
  • Determine the name of the parameter .
  • Returns the actual component type .

wadl-tools Key Features

Very easy to integrate in your already Spring Web MVC project.

Very low intrusive with your actual code. Just add one controllers and all is working.

Capable of generate automatically the grammars sections of the WADL, and the corresponding schemas for the complex types of your REST services. Just adding one standard JAXB annotation in the complex types of your REST services.

Manages automatically simple types, like strings, integers, booleans, …​ and collections of these simple types.

spring-wadl-generator - it’s the library you need to add in the Maven dependencies of your project pom.xml.

spring-wadl-showcase - it’s an example use of the library, where you can view how to configure the controllers, the annotations, …​

Download

copy iconCopydownload iconDownload
git clone ...
cd spring-wadl-generator
mvn clean install

Add dependencies

copy iconCopydownload iconDownload
...
<dependencies>
    ...
    <dependency>
        <groupId>com.autentia.web.rest</groupId>
        <artifactId>spring-wadl-generator</artifactId>
        <version>1.0</version>
    </dependency>
    ...
</dependencies>
...

Add the Spring Web MVC Controllers

copy iconCopydownload iconDownload
package whatever.you.want;

import com.autentia.web.rest.wadl.builder.ApplicationBuilder;
import com.autentia.web.rest.wadl.builder.impl.springframework.SpringWadlBuilderFactory;
import com.autentia.xml.schema.SchemaBuilder;
import net.java.dev.wadl._2009._02.Application;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping(value = "/rest", produces = {"application/xml"})
public class WadlController {

    private final ApplicationBuilder applicationBuilder;
    private final SchemaBuilder schemaBuilder;

    @Autowired
    public WadlController(RequestMappingHandlerMapping handlerMapping) {
        final SpringWadlBuilderFactory wadlBuilderFactory = new SpringWadlBuilderFactory(handlerMapping);
        applicationBuilder = wadlBuilderFactory.getApplicationBuilder();
        schemaBuilder = wadlBuilderFactory.getSchemaBuilder();
    }

    @ResponseBody
    @RequestMapping(value = "wadl", method = RequestMethod.GET)
    public Application generateWadl(HttpServletRequest request) {
        return applicationBuilder.build(request);
    }

    @ResponseBody
    @RequestMapping(value = "schema/{classTypeName}", method = RequestMethod.GET)
    public String generateSchema(@PathVariable String classTypeName) {
        return schemaBuilder.buildFor(classTypeName);
    }

    @ResponseStatus(HttpStatus.NOT_FOUND)
    @ExceptionHandler(IllegalArgumentException.class)
    public void handleException() {
        // Do nothing, just magic annotations.
    }
}

Schema of complex types

copy iconCopydownload iconDownload
...
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
public class Contact {

    private final String id;
    private final String name;
    private final String email;
    ...

Community Discussions

Trending Discussions on wadl-tools
  • How to generate WADL?
Trending Discussions on wadl-tools

QUESTION

How to generate WADL?

Asked 2019-Jan-20 at 17:25

I have a REST api written with spring and I'm interested in generating a WADL from that service.

I saw few posts talking about that it's built in into spring & jersey and should be available from this url (using browser in my case):

http://< host >:8080/< Project Name >/management/application.wadl

in web.xml:

<servlet-mapping>
<servlet-name>rest</servlet-name>
<url-pattern>/management/*</url-pattern>

Controller:

@RestController
@RequestMapping(value = { "/management" })
public class MyConroller {

But I'm getting:

HTTP Status 404
The requested resource is not available.

I tried following these instructions, but still not working for me:-

https://github.com/autentia/wadl-tools

(You can refer to this issue: wadl-tools)

How can I enable it?

Thanks.

ANSWER

Answered 2018-Nov-14 at 13:09

Managed using wadl-tools.

see: https://github.com/autentia/wadl-tools/issues/7

But I understood that this is an old aproch, so switched to OpenApi with swagger which looks much better: A 'simple' way to implement Swagger in a Spring MVC application

Source https://stackoverflow.com/questions/53249008

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install wadl-tools

Right now we are not in the Maven central repository (we are working on it), so you have to clone the project and install it in you local machine or your own Maven repository (Artifactory, Archiva, Nexus, or whatever other you use).

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Consider Popular Model View Controller Libraries
Compare Model View Controller Libraries with Highest Support
Compare Model View Controller Libraries with Permissive License
Compare Model View Controller Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.