summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDan Duvall <dduvall@wikimedia.org>2018-10-19 13:36:32 -0700
committerTyler Cipriani <tcipriani@wikimedia.org>2018-12-12 12:15:31 -0700
commit3da9f201cad3b09b4e7d70dcaf023c70b4bcc026 (patch)
tree6e00325a47d34dcf9f3d97d0bec155835bc7d5f2 /Makefile
parent56e830f6417fe1ebda1bdc2cf7810dcccd9a7da6 (diff)
downloadblubber-3da9f201cad3b09b4e7d70dcaf023c70b4bcc026.tar.gz
Support "application/json" in Blubberoid
JSON seems a better option for a web service in general—other toolchains in the Docker/Kubernetes space typically prefer YAML for human-edited configs but convert to JSON on the wire. The "application/json" media type is well established—unlike "application/yaml" which has no official assignment by IANA—and is better supported by the OpenAPI (formerly Swagger) specification. Added content-type media type validation in the Blubberoid HTTP server handler, and added a check for `json.Valid(body)` upon receiving a "application/json" media type. Since any given valid JSON is also valid YAML, Blubberoid simply does a shallow validation of the JSON body before punting to `config.ReadConfig` for YAML unmarshalling and thorough config validation. Bug: T205920 Change-Id: I970acbde497ed446eb8eed568b1328f8c6f5aa55
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions