Twintipify your Spring Web MVC application
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper
src
.gitignore
.mailmap
.travis.yml
.zappr.yaml
AUTHORS
CONTRIBUTING.md
LICENSE
README.md
mvnw
mvnw.cmd
pom.xml
release.sh

README.md

Twintip Schema Discovery for Spring Web

Build Status Coverage Status Javadoc Release Maven Central License

Twintipify your Spring Web MVC application. This library exposes your API schema at /.well-known/schema-discovery as specified in our RESTful API Guidelines. Twintip was the former API crawler that was tasked with finding and indexing API schemas, hence the name of this library.

Features

  • never think about your Twintip-compatible schema discovery endpoint ever again

Dependencies

  • Java 8
  • Any build tool using Maven Central, or direct download
  • Servlet Container
  • Spring

Installation

Add the following dependency to your project:

<dependency>
    <groupId>org.zalando</groupId>
    <artifactId>twintip-spring-web</artifactId>
    <version>${twintip-spring-web.version}</version>
</dependency>

Configuration

First make sure that the endpoints are mapped into your application.

import org.zalando.twintip.spring.SchemaResource;

@Configuration
@Import(SchemaResource.class)
public class YourConfigration {
    // whatever you configure
}

Next you need to provide the API definition and decide where clients should find it. You can do this in your application.properties or application.yml.

twintip:
  mapping: /api
  yaml: "classpath:api.yml"

CORS Support

SchemaResource will send CORS Access-Control-* headers by default. You can disable this by setting twintip.cors property to false.

Host, port, schemes and base path inside of the API definition can be overridden by setting the twintip.baseUrl property to full base URL of API.

Getting Help

If you have questions, concerns, bug reports, etc., please file an issue in this repository's Issue Tracker.

Getting Involved/Contributing

To contribute, simply make a pull request and add a brief description (1-2 sentences) of your addition or change. For more details, check the contribution guidelines.