13 Building a backend with Node.js and Swagger Codegen

This chapter covers

  • Generating backend code with Swagger Codegen
  • Optimizing an OpenAPI definition for code generation
  • Designing a Mongoose/MongoDB database based on the domain model
  • Implementing a basic API operation in Node.js

José’s PetSitter team has created an OpenAPI definition for the API that connects the frontend with the backend. They have now reached the stage of the project where both developers are confident that the API is solid enough to start working on the implementation. In this chapter we’ll join Nidhi, the backend developer, as she builds a backend that exposes the API that Max designed in chapter 10 and that she herself reviewed in chapter 11. While we’ll touch upon ...

Get Designing APIs with Swagger and OpenAPI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.