github / rest-api-description

An OpenAPI description for GitHub's REST API
MIT License
1.39k stars 225 forks source link

[Schema Inaccuracy] Get Octocat Accept: application/octocat-stream #1053

Open SebastiaanLubbers opened 2 years ago

SebastiaanLubbers commented 2 years ago

Schema Inaccuracy

GET https://api.github.com/octocat?s=Hello%20World Accept: application/octocat-stream

Expected

               MMMMMMMMMMMMMMMMMMM
               MMMMMMMMMMMMMMMMMMM      _____________
              MMMMMMMMMMMMMMMMMMMMM    |             |
             MMMMMMMMMMMMMMMMMMMMMMM   | Hello World |
            MMMMMMMMMMMMMMMMMMMMMMMM   |_   _________|
            MMMM::- -:::::::- -::MMMM    |/
             MM~:~ 00~:::::~ 00~:~MM
        .. MMMMM::.00:::+:::.00::MMMMM ..
              .MM::::: ._. :::::MM.
                 MMMM;:::::;MMMM
          -MM        MMMMMMM
          ^  M+     MMMMMMMMM
              MMMMMMM MM MM MM
                   MM MM MM MM
                   MM MM MM MM
                .~~MM~MM~MM~MM~~.
             ~~~~MM:~MM~~~MM~:MM~~~~
            ~~~~~~==~==~~~==~==~~~~~~
             ~~~~~~==~==~==~==~~~~~~
                 :~==~==~==~==~~

Actual

{
  "message": "Unsupported 'Accept' header: 'application/octocat-stream'. Must accept 'application/json'.",
  "documentation_url": "https://docs.github.com/v3/media"
}

Reproduction Steps

curl GET https://api.github.com/octocat?s=Hello%20World -H "Accept: application/octocat-stream"

ahoglund commented 2 years ago

@SebastiaanLubbers - You found our easter egg /octocat endpoint 🎉. This endpoint is (purposely) not documented, but interesting that it doesn't allow for the octocat-stream Accept header. I'll raise an issue for this internally.