Project

General

Profile

Actions

action #64496

closed

job_templates_scheduling API always returns YAML, even if client requests JSON

Added by AdamWill about 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Start date:
2020-03-13
Due date:
% Done:

0%

Estimated time:

Description

If you send a GET request to the /job_templates_scheduling endpoint, what you get back is always YAML, even if you specifically request JSON:

[adamw@adam openQA (master %)]$ http --json get https://openqa.fedoraproject.org/api/v1/job_templates_scheduling/1
HTTP/1.1 200 OK
...
Content-Type: text/yaml;charset=UTF-8
...

defaults:
  arm:
    machine: ARM
    priority: 50
  x86_64:
    machine: 64bit
    priority: 50

Per the docs, with http --json "The Content-Type and Accept headers are set to application/json (if not specified)."

A server should not really return YAML when the client states that it accepts (only) JSON, I don't think. It's also somewhat surprising behaviour in general for an API that has always returned JSON for everything to suddenly start returning YAML for some specific thing.

Actions #1

Updated by tinita about 4 years ago

  • Status changed from New to In Progress
  • Assignee set to tinita
Actions #2

Updated by tinita about 4 years ago

  • Target version set to Current Sprint
Actions #3

Updated by tinita about 4 years ago

  • Status changed from In Progress to Feedback
Actions #4

Updated by tinita about 4 years ago

PR was merged

Actions #5

Updated by okurz about 4 years ago

… and? :)

Actions #6

Updated by tinita about 4 years ago

  • Status changed from Feedback to Resolved

Guess it can be resolved then.

Actions

Also available in: Atom PDF