wire-server icon indicating copy to clipboard operation
wire-server copied to clipboard

Script to render event json schemas from haskell types.

Open fisx opened this issue 3 years ago • 0 comments

https://wearezeta.atlassian.net/browse/FS-1008

our swagger2 docs do not contain event types, since they are contained in an untyped json body. this is a tool to fill that gap, and create the event type schemas in a stand-along json document.

we have events of 3 categories: conversation, feature-config, team. the former two can be rendered; in order for team to work, we need to translate the swagger1 docs to schema-profunctor in the wire-api package first.

make c package=event-schemas && /home/mf/src/wire-server/dist-newstyle/build/x86_64-linux/ghc-8.10.7/event-schemas-1.0.0/x/event-schemas/noopt/build/event-schemas/event-schemas | jq . > /tmp/event-schemas.json

event-schemas.json.zip

on second thought, this should really be an end-point in brig, not something under /tools, so we can expose it on staging and everybody can pull it at any time and have it up to date.

Checklist

  • [ ] Add a new entry in an appropriate subdirectory of changelog.d
  • [ ] Read and follow the PR guidelines

fisx avatar Sep 29 '22 20:09 fisx