// JAX-RS from Microprofile specification
// OpenAPI from Microprofile specification
@OpenAPIDefinition(info = @Info(title = "Authors Service", version = "1.0", description = "Authors Service APIs", contact = @Contact(url = "https://github.com/nheidloff/cloud-native-starter", name = "Niklas Heidloff"), license = @License(name = "License", url = "https://github.com/nheidloff/cloud-native-starter/blob/master/LICENSE")))
// JAX-RS from Microprofile specification
// OpenAPI from Microprofile specification
description = "Author Not Found"
description = "Author with requested name",
mediaType = "application/json",
schema = @Schema(implementation = Author.class)
description = "Internal service error"
summary = "Get specific author",
description = "Get specific author"
public Response getAuthor(@Parameter(
description = "The unique name of the author",
example = "Niklas Heidloff",
schema = @Schema(type = SchemaType.STRING))
@QueryParam("name") String name) {
Author author = new Author();
author.name = "Niklas Heidloff";
author.twitter = "https://twitter.com/nheidloff";
author.blog = "http://heidloff.net";
return Response.ok(this.createJson(author)).build();
private JsonObject createJson(Author author) {
JsonObject output = Json.createObjectBuilder().add("name", author.name).add("twitter", author.twitter)
.add("blog", author.blog).build();