How to Build and Document a Go REST API with Gin and Go-Swagger

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • thunder-client-support

    Thunder Client is a lightweight Rest API Client Extension for VS Code.

  • Our API is now ready for testing. We can use different API methods to test the functionality and behavior of the API including cURL and Postman. For this, we will use a vscode extension called ThunderClient. If using a different text editor, Postman is similar and can be used in place of ThunderClient.

  • Newman

    Newman is a command-line collection runner for Postman

  • There are several ways to document an API including in an API testing client like Postman, but we will use OpenAPI spec to document. OpenAPI is an evolution of Swagger, which is a popular open source tool for all things API. Swagger comes with a user interface to display, interact and test our API documentation.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Gin

    Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

  • Now let’s define the functions that will be called whenever a request hits our API. All the functions will be referencing the context provided by the Gin web framework. Paste the following code below the sample slice we just added to api.go:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Building a RESTful API with Node.js and Express

    3 projects | dev.to | 8 Apr 2024
  • How to Deploy and Secure a Next.js API on AWS

    2 projects | dev.to | 2 Feb 2024
  • Building a CRUD API with Total.js: A Step-by-Step Guide

    2 projects | dev.to | 15 Nov 2023
  • Security implications of cross-origin resource sharing (CORS) in Node.js

    3 projects | dev.to | 14 Sep 2023
  • Easy Tutorial: How to Create an Express API for Beginners

    2 projects | dev.to | 12 Jul 2023