blake-mealey / openapi-review-action

A GitHub action that posts your OpenAPI docs as a comment to your PR whenever they change.
MIT License
2 stars 0 forks source link

Parse all files with YAML parser #12

Closed blake-mealey closed 4 years ago

blake-mealey commented 4 years ago

Resolves #11

github-actions[bot] commented 4 years ago

From spec: ./fixtures/api-with-examples.json

Simple API overview (JSON) v2.0.0

Default

listVersionsv2

GET /

List API versions

Example responses

200 response

{
  "versions": [
    {
      "status": "CURRENT",
      "updated": "2011-01-21T11:33:21Z",
      "id": "v2.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2/",
          "rel": "self"
        }
      ]
    },
    {
      "status": "EXPERIMENTAL",
      "updated": "2013-07-23T11:33:21Z",
      "id": "v3.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v3/",
          "rel": "self"
        }
      ]
    }
  ]
}

300 response

{
  "versions": [
    {
      "status": "CURRENT",
      "updated": "2011-01-21T11:33:21Z",
      "id": "v2.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2/",
          "rel": "self"
        }
      ]
    },
    {
      "status": "EXPERIMENTAL",
      "updated": "2013-07-23T11:33:21Z",
      "id": "v3.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v3/",
          "rel": "self"
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK 200 response None
300 Multiple Choices 300 response None

Response Schema

getVersionDetailsv2

GET /v2

Show API version details

Example responses

200 response

{
  "version": {
    "status": "CURRENT",
    "updated": "2011-01-21T11:33:21Z",
    "media-types": [
      {
        "base": "application/xml",
        "type": "application/vnd.openstack.compute+xml;version=2"
      },
      {
        "base": "application/json",
        "type": "application/vnd.openstack.compute+json;version=2"
      }
    ],
    "id": "v2.0",
    "links": [
      {
        "href": "http://127.0.0.1:8774/v2/",
        "rel": "self"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf",
        "type": "application/pdf",
        "rel": "describedby"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
        "type": "application/vnd.sun.wadl+xml",
        "rel": "describedby"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
        "type": "application/vnd.sun.wadl+xml",
        "rel": "describedby"
      }
    ]
  }
}

203 response

{
  "version": {
    "status": "CURRENT",
    "updated": "2011-01-21T11:33:21Z",
    "media-types": [
      {
        "base": "application/xml",
        "type": "application/vnd.openstack.compute+xml;version=2"
      },
      {
        "base": "application/json",
        "type": "application/vnd.openstack.compute+json;version=2"
      }
    ],
    "id": "v2.0",
    "links": [
      {
        "href": "http://23.253.228.211:8774/v2/",
        "rel": "self"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf",
        "type": "application/pdf",
        "rel": "describedby"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
        "type": "application/vnd.sun.wadl+xml",
        "rel": "describedby"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK 200 response None
203 Non-Authoritative Information 203 response None

Response Schema

github-actions[bot] commented 4 years ago

From spec: ./fixtures/api-with-examples.yaml

Simple API overview (YAML) v2.0.0

Default

listVersionsv2

GET /

List API versions

Example responses

200 response

{
  "versions": [
    {
      "status": "CURRENT",
      "updated": "2011-01-21T11:33:21Z",
      "id": "v2.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2/",
          "rel": "self"
        }
      ]
    },
    {
      "status": "EXPERIMENTAL",
      "updated": "2013-07-23T11:33:21Z",
      "id": "v3.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v3/",
          "rel": "self"
        }
      ]
    }
  ]
}

300 response

{
  "versions": [
    {
      "status": "CURRENT",
      "updated": "2011-01-21T11:33:21Z",
      "id": "v2.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v2/",
          "rel": "self"
        }
      ]
    },
    {
      "status": "EXPERIMENTAL",
      "updated": "2013-07-23T11:33:21Z",
      "id": "v3.0",
      "links": [
        {
          "href": "http://127.0.0.1:8774/v3/",
          "rel": "self"
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK 200 response None
300 Multiple Choices 300 response None

Response Schema

getVersionDetailsv2

GET /v2

Show API version details

Example responses

200 response

{
  "version": {
    "status": "CURRENT",
    "updated": "2011-01-21T11:33:21Z",
    "media-types": [
      {
        "base": "application/xml",
        "type": "application/vnd.openstack.compute+xml;version=2"
      },
      {
        "base": "application/json",
        "type": "application/vnd.openstack.compute+json;version=2"
      }
    ],
    "id": "v2.0",
    "links": [
      {
        "href": "http://127.0.0.1:8774/v2/",
        "rel": "self"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf",
        "type": "application/pdf",
        "rel": "describedby"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
        "type": "application/vnd.sun.wadl+xml",
        "rel": "describedby"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
        "type": "application/vnd.sun.wadl+xml",
        "rel": "describedby"
      }
    ]
  }
}

203 response

{
  "version": {
    "status": "CURRENT",
    "updated": "2011-01-21T11:33:21Z",
    "media-types": [
      {
        "base": "application/xml",
        "type": "application/vnd.openstack.compute+xml;version=2"
      },
      {
        "base": "application/json",
        "type": "application/vnd.openstack.compute+json;version=2"
      }
    ],
    "id": "v2.0",
    "links": [
      {
        "href": "http://23.253.228.211:8774/v2/",
        "rel": "self"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf",
        "type": "application/pdf",
        "rel": "describedby"
      },
      {
        "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl",
        "type": "application/vnd.sun.wadl+xml",
        "rel": "describedby"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK 200 response None
203 Non-Authoritative Information 203 response None

Response Schema