Ottomata has uploaded a new change for review.
https://gerrit.wikimedia.org/r/263861
Change subject: Fixes for service-spec x-amples
......................................................................
Fixes for service-spec x-amples
Change-Id: I48ebf5ff948271990d27525684873d1514fce2f7
---
M eventlogging/service-spec.yaml
M eventlogging/service.py
2 files changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/eventlogging
refs/changes/61/263861/1
diff --git a/eventlogging/service-spec.yaml b/eventlogging/service-spec.yaml
index 4e66c4e..4495ac4 100644
--- a/eventlogging/service-spec.yaml
+++ b/eventlogging/service-spec.yaml
@@ -31,10 +31,12 @@
- title: Produce a valid test event
request:
body:
- - test: "this is a test"
+ test: "this is a test"
meta:
topic: "test.event"
id: "12345678-1234-5678-1234-567812345678"
+ headers:
+ Content-Type: application/json
response:
status: 201
@@ -49,5 +51,5 @@
'200':
description: The current topic->schema mapping and configuration
x-amples:
- response:
- status: 200
+ - response:
+ status: 200
diff --git a/eventlogging/service.py b/eventlogging/service.py
index 22a0cad..50c49eb 100644
--- a/eventlogging/service.py
+++ b/eventlogging/service.py
@@ -55,7 +55,7 @@
# Use the topic that the swagger spec x-ample specifies
# for allowing automated monitoring POSTs.
-spec_test_topic =
swagger_spec['paths']['/v1/events']['post']['x-amples'][0]['request']['body'][0]['meta']['topic']
# noqa
+spec_test_topic =
swagger_spec['paths']['/v1/events']['post']['x-amples'][0]['request']['body']['meta']['topic']
# noqa
spec_test_scid = ('test_event', 1)
--
To view, visit https://gerrit.wikimedia.org/r/263861
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I48ebf5ff948271990d27525684873d1514fce2f7
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits