REST Services With Apache Camel

Microservices are becoming a very popular architectural style for developing greenfield applications and also for brownfield solutions. People are moving away from the monolith solutions due to added advantages like faster development and go-to-market, increased adoption of containerization and small teams, and a lighter codebase. 

You can use either Spring Boot, Quarkus, or Lagom frameworks to develop the REST services. I would like to show how we can use Apache Camel, a leading opensource integration framework, to write REST services easier and quicker using the REST domain-specific language (DSL).

Rest API Documentation and Client Generation With OpenAPI

Microservices architecture helps in building an application as a suite of multiple fine-grained smaller services. Each of these services run in its own process and are independently deployable. They may have been developed in different programming languages and may use different data storage techniques and communicate with each other via lightweight mechanisms like RESTful APIs, message queues etc. Now that services(API clients) need to know how to interact with each other, there is a need of API documentation that should be clear, informative, and easy to go through.

OpenAPI makes documenting these RESTful services very easy and can be done by adding few annotations to a Spring-based project. Besides rendering documentation, it allows the API consumers to interact with the APIs without having their own implementation logic in place. Also, it can be used to generate the API client libraries for over 50+ languages. In this post, I’ll cover how to use OpenAPI to generate REST API documentation and Java clients for a Spring Boot project.

Are Automated APIs the future? Podcast With Zdenek “Z” Nemec

In 2020, APIs are an essential part of any digital transformation toolkit. Whether you’re looking to deliver new products, expand your marketing reach, analyze your data, innovate on existing technologies, or improve work efficiency — modern enterprises rely on APIs to get things done.

However, as API adoption explodes, the complexity of discovery, consumption, and integration also gets dialed to eleven. When APIs have to be integrated and maintained manually, this places an additional burden on an already overwhelmed IT department. Superface.ai Co-Founder and CTO Zdenek Nemec explain how automation can change the way we develop and approach APIs and how description formats such as OpenAPI and AsyncAPI help make APIs be more discoverable.

API Security Weekly: Issue #115

Happy New Year 2021!

This week, we revisit the API aspects of the SolarWinds breach and check out how APIs featured in the recent Ledger breach. There is also an API vulnerability found in Microsoft’s Office 365 Outlook and a new API development and security plugin for JetBrains IDEs.

Benefits of Using the OpenAPI (Swagger) Specification for Your APIs

With software products becoming just a bunch of micro-services and third-party APIs mashed together, it's more crucial than ever to get their structure in order.

GraphQL already did this at its inception by coming up with a whole specification that describes how APIs of its type should behave. In the RESTful API landscape, things were a bit more wild west. However, even if not all backend devs know it, there are a number of specifications for REST APIs as well.

Can your API Gateway Tango to Open API Spec?

Open API Spec — an API-First Approach

Enterprises today use an API first approach towards application development and sharing data. This API based approach is used under several scenarios like — breaking up a monolith into microservices, adopting cloud, and adopting Kubernetes.

APIs are also a popular choice to adopt Service Oriented Architectural approach. API also forms a key tenant to support data sharing and logic reuse. An API in an application can be compared to a function in the imperative programming paradigm.

Java/Cloud: How to Quickly Create a Kubernetes-Ready REST Microservice

It is safe to say that the Microservice + Cloud combination is all the rage these days. Microservices are being developed more than ever, in turn increasing the number of application deployments. During the past decade, containerization and orchestration tools such as Docker and Kubernetes were developed, making the microservice pattern easy to adopt.

This article will teach you how to generate a completely functional microservice with an exposed REST API capable of interacting with a MySQL database and deploy it to your local Kubernetes cluster. The learnings here can be applied to almost any database type like Oracle, SQL Server, DB2, and so on.

Doing More With Springdoc-OpenAPI

In my last recent article we tried out a Spring Boot Open API 3-enabled REST project and explored some of its capabilities namely:

  • Automatic JSR-303 related swagger documentation.
  • How maven builds properties could be shown as project information in the swagger documentation.

In this continuation we will explore two additional Objectives namely:

Keeping OpenAPI DRY

I really enjoy API development. As someone who enjoys writing, I also enjoy providing solid documentation for consumers of my APIs to utilize. When my APIs are used by teams across the United States and other countries it becomes important to provide reliable and detailed information. The same is true for public APIs when the consumer is simply not known.

However, I really am not a fan of repetition in my code...and that includes API documentation.

Designing a REST API — What Is a Code-First Approach?

Designing a REST API — Code-First Approach

Designing a great REST API is important to have great microservices. The Code-First approach focuses on generating the contract from code. Is it the best possible approach?

You might also like:  Code-First Approach With ASP.NET MVC Framework

You Will Learn

  • What is the Code-First approach to designing a REST API?
  • What are advantages of the Code-First approach?
  • What are disadvantages of the Code-First approach?
  • When do you adopt the Code-First approach?

REST API

This is the fourth article in a series of articles on REST APIs:

Gemini Starter: Model-Driven CRUD REST APIs With Spring

Gemini

This article explains what is included in the Gemini Starter Repository and how to start with a full Gemini project to set up a CRUD REST API, starting from Data Model and without generating code.

You may also like: Developing REST APIs

Gemini is a model-driven REST framework that automatically generates CRUD APIs. You can take a look at the official repository here. We are going to define entities and code to obtain the following CRUD APIs.

Easy REST APIs With AutoRest

It's easy to REST with AutoRest.

“We live in an API-driven world,” said Julia Kreger, OpenStack Ironic project team lead and principal software engineer at Red Hat.

API is an acronym for “Application Programming Interface.” It has a long history since the first computer programs were written. At first, APIs form “contracts” for accessing resources from the operating system, software libraries, or other systems.

Doing More With Swagger and Spring

In my last article, I gave a quick introduction to Swagger in the Spring realm. Also, we saw how the additional Maven artifact "spring-swagger-simplified" automatically leverages the validation constraint annotations used by Spring and enriches the Swagger models and Swagger UI.

Below, for a quick recap, we look at the automatic model enhancements amongst other things we had discussed in the previous article.

Building Web Applications With Spring, Cucumber, and Swagger

Why?

Because a lot of software developers spend a lot of time building production ready Java-based web applications (with APIs) that include an automated test suite.

My intention is to build a reference application using a proven/robust application stack which can then be used to build applications from the scratch, fast. Maybe 10X faster.

Contract Testing in HL Tech With Judge Dredd, Part 2

Welcome back! If you missed Part 1, you can check it out here

Consumer Expectations

Consumer expectations are expressed in Pact format. Pact format specifies sample interactions between a consumer and its provider. All interactions between them must be described separately with sample values, which can be later validated against a Swagger file. In Picture 6, a sample Pact file is presented which was generated based on Judge Dredd Agent.