my blog. for you.

Let’s talk digital.

I’m an independent IT consultant and entrepreneur in the Internet and software business. I’m interested in design, enterprise applications, web apps and SaaS products. I design and develop business solutions and applications. I help companies in terms of software quality and knowledge transfer, e.g. with Angular and Spring Boot.

Documenting REST APIs Provided by Express Applications

swagger-jsdoc is an NPM library that allows us to generate an OpenAPI specification for REST APIs provided by an Express application. swagger-jsdoc consumes YAML-formatted OpenAPI specification segments within JSDoc comments annotated with the @openapi annotation and turns those into a comprehensive OpenAPI specification for our API. This specification, in turn, can for example be used for automatically having a Swagger UI documentation page created for our REST APIs (using Swagger UI Express, for instance). While annotating Express routes with syntactically and semantically correct OpenAPI ... Read more

API-First Development with Spring Boot and Swagger at Reflectoring

When I recently had to look into some of the specifics of using Swagger and OpenAPI for designing an API specification and generating a Spring Boot application skeleton from that specification (using OpenAPI Generator) I came across this very useful and comprehensive article on the subject on the Reflectoring blog: API-First Development with Spring Boot and Swagger From creating an API specification with the Swagger editor to generating code (with the OpenAPI Generator Maven plugin, specifically) and implementing the generated interfaces the article ... Read more

Using Swagger to Generate Client SDKs for REST APIs

These days Swagger is a popular, easy-to-use tool for (semi-)automatically documenting REST APIs on-the-fly. For example, in order to document a REST API created with Spring Boot and Jersey literally all you have to do is add these two entries to your Maven pom.xml: [xml] <dependency> <groupid>io.springfox</groupid> <artifactid>springfox-swagger2</artifactid> <version>2.6.1</version> </dependency> <dependency> <groupid>io.springfox</groupid> <artifactid>springfox-swagger-ui</artifactid> <version>2.6.1</version> </dependency> [/xml] You'll then get a ready-made documentation for all your REST API endpoints. An example of how this looks like can be seen here. While this already is very useful in that it helps with properly documenting your software, especially ... Read more