• Stars
    star
    226
  • Rank 170,081 (Top 4 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Golang package for generating API documentation from httptest. See example output

go-httpdoc Go Documentation

go-httpdoc is a Golang package to generate API documentation from httptest test cases.

It provides a simple http middleware which records http requests and responses from tests and generates documentation automatically in markdown format. See Sample Documentation. It also provides a way to validate values are equal to what you expect with annotation (e.g., you can add a description for headers, params or response fields). If you write proper tests, it will generate usable documentation (namely, it forces you to write good tests).

Not only JSON request and response but it also supports protocol buffer. See Sample ProtoBuf Documentation).

See usage and example in GoDoc.

NOTE: This package is experimental and may make backward-incompatible changes.

Prerequisites

go-httpdoc requires Go 1.7 or later.

Install

Use go get:

$ go get -u go.mercari.io/go-httpdoc

Usage

All usage are described in GoDoc.

To generate documentation, set the following env var:

$ export HTTPDOC=1

Reference

The original idea came from r7kamura/autodoc (rack middleware).

For struct inspection in validator, it uses tenntenn/gpath package.

More Repositories

1

ml-system-design-pattern

System design patterns for machine learning
2,105
star
2

engineer-vocabulary-list

Engineer Vocabulary List in Japanese/English
1,734
star
3

gaurun

General push notification server in Go
Go
925
star
4

production-readiness-checklist

Production readiness checklist used for Mercari and Merpay microservices
805
star
5

tfnotify

A CLI command to parse Terraform execution result and notify it to GitHub
Go
608
star
6

Mew

The framework that support making MicroViewController.
Swift
481
star
7

grpc-http-proxy

A reverse proxy server which translate JSON HTTP requests to gRPC calls based on protoreflect
Go
367
star
8

go-circuitbreaker

A context aware circuit breaker library in Go.
Go
346
star
9

mercari-microservices-example

Go
309
star
10

QRScanner

A simple QR Code scanner framework for iOS. Provides a similar scan effect to ios13+.
Swift
303
star
11

tortoise

Tortoise: Shell-Shockingly-Good Kubernetes Autoscaling
Go
283
star
12

datastore

(AE|Cloud) Datastore Wrapper
Go
215
star
13

mercari-slack-guidelines

Slack guidelines of Mercari.
201
star
14

ShimmerView

ShimmerView is a collection of APIs to construct Skelton View + Shimmering Effect type loading indicator on UIKit and SwiftUI.
Swift
186
star
15

grpc-federation

gRPC Federation generates a gRPC server by writing a custom option in Protocol Buffers
Go
158
star
16

mercari-engineering-ladder

Mercari's Expectations for Engineers in Various Stages of Their Career
148
star
17

mtc2018-app

The Official Conference App for Mercari Tech Conf 2018
Dart
134
star
18

go-grpc-interceptor

gRPC server insterceptor for golang
Go
123
star
19

go-dnscache

Go package for caching DNS lookup results in memory.
Go
121
star
20

souzoh-recruitment

118
star
21

certificate-expiry-monitor-controller

Certificate Expiry Monitor Controller monitors the expiration of TLS certificates used in Ingress.
Go
117
star
22

mtc2018-web

Mercari Tech Conf 2018
TypeScript
98
star
23

BottomHalfModal

A customizable bottom half modal used in merpay
Swift
95
star
24

kubetempura

Go
92
star
25

widebullet

Widebullet is an API gateway with JSON-RPC
Go
88
star
26

dietcube

The world super fly weight & flexible PHP framework.
PHP
79
star
27

docker-appengine-go

Projects has been moved
Dockerfile
74
star
28

spanner-autoscaler

Kubernetes Operator for Cloud Spanner autoscaling
Go
72
star
29

RxReduxK

Micro-framework for Redux implemented in Kotlin
Kotlin
66
star
30

go-emv-code

EMV® QR Code Encoder/Decoder for Go.
Go
64
star
31

testdeck

Testdeck is a framework for integration, end-to-end (E2E), and security testing of gRPC microservices written in Golang.
Go
64
star
32

DataflowTemplate

Mercari Dataflow Template
Java
60
star
33

RemoteDataK

Algebraic data type (ADT) to represent the state of data that is loading from/to remote sources/destinations
Kotlin
44
star
34

go-httpstats

Go package for reporting HTTP stats
Go
43
star
35

fractal

Swift
36
star
36

hcledit

Go package to edit HCL configuration
Go
35
star
37

go-bps

Go package to manage the basis point
Go
34
star
38

mtc2018-app-SwiftUI

Project to rewrite MTC2018 App by SwiftUI
Swift
33
star
39

siberi-android

A/B testing library for Android
Java
33
star
40

BalloonView

Makes balloon-like view with an arrow pointing to another view. Useful for onboarding tutorials
Swift
25
star
41

DataflowTemplates

Convenient Dataflow pipelines for transforming data between cloud data sources
Java
24
star
42

yasashii-wfh-comms

yasashii-WFH-Communication-Best-Practices
20
star
43

swiftui-chart

Swift
15
star
44

honyakubot

Slack translation bot
Swift
13
star
45

terraform-provider-spinnaker

A Spinnaker provider for Terraform
Go
13
star
46

github-app-token-generator

A simple github action written in go to retrieve an installation access token for an app installed into an organization.
Go
12
star
47

CFQIRBM

Collaborative Filtering Quantum Infinite Restricted Boltzmann Machine
Jupyter Notebook
12
star
48

composer-diff-plugin

composer plugin to show library version diff at "composer update".
PHP
12
star
49

github-token-app

Github Token App is a package for generating short lived github tokens (expires in 1 hour) with minimum necessary permissions.
Python
11
star
50

Remi

Mascot
10
star
51

terraform-provider-openpgp

Terraform OpenPGP provider
Go
8
star
52

imageflux-cli

Go
8
star
53

eslint-config-mercari

JavaScript
7
star
54

universal-apk-plugin

Gradle Plugin allowing to create an Universal APK for debug purpose.
Kotlin
6
star
55

mkdocs-git-snippet

Python
6
star
56

commitver

Derive a semver version from the commit history in any repo.
Shell
6
star
57

kafka-connect-transform-kryptonite-gcp

Java
5
star
58

proto-to-type

A Node.js library that generates type definition for TypeScript from Protocol Buffer
TypeScript
4
star
59

merlin

Merlin is an agent sends out alerts when kubernetes resources are misconfigured or not comply with custom rules.
Go
3
star
60

stylelint-config-mercari

The shareable config for @stylelint by @mercari.
CSS
2
star
61

extract-primitives

extract-primitives extracts primitive values from TypeScript's declaration file(.d.ts).
TypeScript
2
star
62

Whitesource-Scan-Action

Shell
2
star
63

modserver

modserver is a simple Go module server.
Go
2
star
64

merpay-netpayment-sdk-php

Merpay Online Payments SDK for PHP
PHP
1
star
65

terraform-exfiltration-lab

HCL
1
star
66

pubsubloader

Archived. You can find a better way on https://github.com/GoogleCloudPlatform/DataflowTemplates/tree/master/v2/streaming-data-generator. Cloud Dataflow based Cloud Pub/Sub load generator and integration tester with custom data
Scala
1
star
67

mercari-ml-merrec-pub-us

Python
1
star