Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering RESTful Web Services with Java
  • Table Of Contents Toc
Mastering RESTful Web Services with Java

Mastering RESTful Web Services with Java

By : Marián Varga, Pedro Henrique Pereira de Andrade, Silvio de Morais, Thiago Bomfim, Igor Avancini Fraga
close
close
Mastering RESTful Web Services with Java

Mastering RESTful Web Services with Java

By: Marián Varga, Pedro Henrique Pereira de Andrade, Silvio de Morais, Thiago Bomfim, Igor Avancini Fraga

Overview of this book

REST powers the modern web, yet developers grapple with architectural missteps that lead to poorly designed REST endpoints, inadequate error handling, security vulnerabilities, and maintenance headaches. Written by five software engineering and Java experts, Mastering RESTful Web Services with Java helps you overcome these pitfalls with a deep, practical understanding of REST architecture, HTTP protocols, and modern API design principles. This hands-on guide introduces foundational concepts based on Roy Fielding’s principles and the Richardson Maturity Model and shows you how to apply them in your API development projects. You’ll build a Product API from scratch, progressively enhancing it with documentation, versioning, and security features, and then advance to creating an Order Management API that interacts with the Product API, while implementing advanced testing and performance optimization techniques. Each chapter delivers step-by-step explanations and practical examples, ensuring you develop production-ready skills that translate directly to your daily work. By the end of the book, you’ll be ready to deliver production-grade RESTful services and become the API expert your team turns to for critical application development projects.
Table of Contents (18 chapters)
close
close
Lock Free Chapter
1
Steps to a Great API
6
Enhancing Your API
11
Deployment and Performance
16
Other Books You May Enjoy
17
Index

Generating Code with OpenAPI

In this chapter, we will start the development of a completely new API called Order Management that will interact with the Product API developed in Chapter 2 and evolved in Chapter 3.

In the previous chapter, the Product API was developed following the code-first approach, wherein the API was implemented before the documentation.

In this chapter, we will adopt a specification-first approach, also known as API-first, wherein we will have the specification of the whole API done first, and then have the API implemented.

Firstly, we will build the OpenAPI specification for the Order Management API, declaring the paths, methods, and request and response schemas (some of them using polymorphism) for it.

Then, we will use OpenAPI tools to generate Java code stubs from the API specification. This generated code speeds up the implementation process, reduces manual maintenance of boilerplate code, and, most importantly, makes it easier to maintain...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering RESTful Web Services with Java
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon