Posts Tagged ‘Api’

Integrating Swagger into a Spring Boot RESTful Webservice with Springfox

Wednesday, July 1st, 2015

Spring Boot allows us to create RESTful web-services with ease, Swagger specifies a format to describe the capabilities and operations of these services and with Swagger UI it is possible to explore our REST API with a nice graphical user interface in our browser.

Springfox is a project that aims at creating automated JSON API documentation for API’s built with Spring and is used in the following tutorial to integrate Swagger into a sample application.

(more…)

Documenting RESTful Webservices in Swagger, AsciiDoc and Plain Text with Maven and the JAX-RS Analyzer

Tuesday, June 16th, 2015

A variety of different tools exists to help us analyze RESTful web-services and create documentations for their APIs in different formats.

In the following tutorial I’d like to demonstrate how to document an existing JAX-RS web-service in multiple formats like Swagger, AsciiDoc or Plain Text using Maven, the JAX-RS Analyzer and the JAX-RS Analyzer Maven Plugin.

The JAX-RS Analyzer gathers its information not only by reflection like most other tools but also by bytecode analysis and therefore does not require us to add special annotations for documentation to our code.

(more…)

Lucene Snippets: Faceting Search

Tuesday, August 28th, 2012

The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets.

In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards ..

(more…)

Ordering your JUnit Rules using a RuleChain

Tuesday, February 21st, 2012

JUnit Rules are a handy solution if one needs to alter test methods or wants to share common functionality between several test cases. JUnit 4.10 introduced a new class to order several rules according to our needs using a so called rule-chain.

In the following example, we’re going to create a simple custom rule and afterwards bind several instances of it in a specified order to a test method.

(more…)

Snippets: Getting License Information from the Confluence API

Thursday, May 6th, 2010

Sometimes one needs to look up license details of a running Confluence system .. perhaps for creating a commercial plugin or to display recommendations dependant from the license used. For this reason there are a few possibilities for receiving some license information from the Confluence API or the velocity context.

(more…)

Sensor Fun: Using the accelerometer on Android

Tuesday, April 27th, 2010

Here is an example on how to use the accelerometer in your Android application. If you want to simulate the acceleration on the emulator I highly recommend the Sensor Simulator on the OpenIntents website.

The following example app displays the coordinates received by the sensor. (more…)

A look at Maven 3 alpha

Monday, March 22nd, 2010

We are all waiting for a stable release of Maven3 with following updates ..

  • faster, more performant .. save us time building our software and some precious memory ;)
  • improved artifact resolution api and plugin api
  • better osgi integration
  • a few bugfixes
  • no mixing of application dependencies and tooling dependencies
  • though it does not matter that much to me: polyglot features .. e.g.: “Writing your pom files in Groovy”
  • version-less parent elements for multi-module or multi-pom projects, no need to define the parent version in every submodule
  • better artifact resolution, which dependency or pom supplied which artifact to the outcome .. got that information from: “Splitter from the world of Java”

(more…)

Search
Categories