alertmanager/vendor/github.com
Max Leonard Inden f1b920bcc9
api: Implement OpenAPI generated Alertmanager API V2
The current Alertmanager API v1 is undocumented and written by hand.
This patch introduces a new Alertmanager API - v2. The API is fully
generated via an OpenAPI 2.0 [1] specification (see
`api/v2/openapi.yaml`) with the exception of the http handlers itself.

Pros:
- Generated server code
- Ability to generate clients in all major languages
  (Go, Java, JS, Python, Ruby, Haskell, *elm* [3] ...)
    - Strict contract (OpenAPI spec) between server and clients.
    - Instant feedback on frontend-breaking changes, due to strictly
      typed frontend language elm.
- Generated documentation (See Alertmanager online Swagger UI [4])

Cons:
- Dependency on open api ecosystem including go-swagger [2]

In addition this patch includes the following changes.

- README.md: Add API section

- test: Duplicate acceptance test to API v1 & API v2 version

  The Alertmanager acceptance test framework has a decent test coverage
  on the Alertmanager API. Introducing the Alertmanager API v2 does not go
  hand in hand with deprecating API v1. They should live alongside each
  other for a couple of minor Alertmanager versions.

  Instead of porting the acceptance test framework to use the new API v2,
  this patch duplicates the acceptance tests, one using the API v1, the
  other API v2.

  Once API v1 is removed we can simply remove `test/with_api_v1` and bring
  `test/with_api_v2` to `test/`.

[1]
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md

[2] https://github.com/go-swagger/go-swagger/

[3] https://github.com/ahultgren/swagger-elm

[4]
http://petstore.swagger.io/?url=https://raw.githubusercontent.com/mxinden/alertmanager/apiv2/api/v2/openapi.yaml

Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
2018-09-04 13:38:34 +02:00
..
alecthomas [amtool] use kingpin.v2 (#1330) 2018-04-24 09:35:15 +02:00
armon/go-metrics *: move to memberlist for clustering 2018-02-08 12:18:44 +01:00
asaskevich/govalidator api: Implement OpenAPI generated Alertmanager API V2 2018-09-04 13:38:34 +02:00
beorn7/perks/quantile Update vendoring 2015-09-30 17:00:25 +02:00
cenkalti/backoff Vendor backoff library 2015-10-09 09:39:04 +02:00
cespare/xxhash Filter alerts (#633) 2017-03-16 11:16:10 +01:00
davecgh/go-spew Filter alerts (#633) 2017-03-16 11:16:10 +01:00
docker/go-units api: Implement OpenAPI generated Alertmanager API V2 2018-09-04 13:38:34 +02:00
go-kit/kit Update vendoring for logger change 2017-10-22 00:20:40 -07:00
go-logfmt/logfmt Update vendoring for logger change 2017-10-22 00:20:40 -07:00
go-openapi api: Implement OpenAPI generated Alertmanager API V2 2018-09-04 13:38:34 +02:00
go-stack/stack Update vendoring for logger change 2017-10-22 00:20:40 -07:00
gogo/protobuf *: move to memberlist for clustering 2018-02-08 12:18:44 +01:00
golang/protobuf vendor: remove unused packages (#1380) 2018-05-14 16:23:48 +02:00
hashicorp *: move to memberlist for clustering 2018-02-08 12:18:44 +01:00
jessevdk/go-flags api: Implement OpenAPI generated Alertmanager API V2 2018-09-04 13:38:34 +02:00
julienschmidt/httprouter Update vendoring for logger change 2017-10-22 00:20:40 -07:00
kr/logfmt *: move to memberlist for clustering 2018-02-08 12:18:44 +01:00
kylelemons/godebug vendor: add godebug/pretty 2016-05-03 12:39:22 +02:00
mailru/easyjson api: Implement OpenAPI generated Alertmanager API V2 2018-09-04 13:38:34 +02:00
matttproud/golang_protobuf_extensions/pbutil Update vendoring 2015-09-30 17:00:25 +02:00
miekg/dns *: move to memberlist for clustering 2018-02-08 12:18:44 +01:00
mitchellh/mapstructure api: Implement OpenAPI generated Alertmanager API V2 2018-09-04 13:38:34 +02:00
mwitkow/go-conntrack vendor: update prometheus/common packages (#1414) 2018-06-13 16:11:22 +02:00
oklog *: move to memberlist for clustering 2018-02-08 12:18:44 +01:00
pkg/errors Simplify silence modifications, add update endpoint (#796) 2017-05-16 16:48:25 +02:00
pmezard/go-difflib Filter alerts (#633) 2017-03-16 11:16:10 +01:00
prometheus vendor: update prometheus/common packages (#1414) 2018-06-13 16:11:22 +02:00
PuerkitoBio api: Implement OpenAPI generated Alertmanager API V2 2018-09-04 13:38:34 +02:00
satori/go.uuid vendor: add github.com/satori/go.uuid 2016-08-09 11:48:38 +02:00
sean-/seed *: move to memberlist for clustering 2018-02-08 12:18:44 +01:00
stretchr/testify vendor: add testify package and dependencies 2016-08-16 11:11:48 +02:00
xlab/treeprint feat: added routing tools to amtool (#1511) 2018-08-22 16:41:09 +02:00