Skip to content

Instantly share code, notes, and snippets.

@jeremyfiel
Created April 22, 2022 19:19
Show Gist options
  • Select an option

  • Save jeremyfiel/85fd4f39944a472cb6bb60d529e2b602 to your computer and use it in GitHub Desktop.

Select an option

Save jeremyfiel/85fd4f39944a472cb6bb60d529e2b602 to your computer and use it in GitHub Desktop.

Revisions

  1. jeremyfiel created this gist Apr 22, 2022.
    94 changes: 94 additions & 0 deletions openapi-test-headers.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,94 @@
    {
    "openapi": "3.0.3",
    "servers": [
    {
    "url": "https://__host__/"
    }
    ],
    "info": {
    "description": "Test api",
    "version": "1.0.0",
    "title": "empty title"
    },
    "paths": {
    "/some-path/{aoid}": {
    "get": {
    "description": "some description",
    "tags": [
    "a tag"
    ],
    "summary": "what it does",
    "parameters": [
    {
    "$ref": "#/components/parameters/path_aoid"
    },
    {
    "$ref": "#/components/parameters/query_filter"
    },
    {
    "$ref": "#/components/parameters/header_If-Match"
    }
    ],
    "responses": {
    "200": {
    "description": "Ok",
    "headers": {
    "ETag": {
    "$ref": "#/components/headers/ETag"
    },
    "Last-Modified": {
    "$ref": "#/components/headers/Last-Modified"
    }
    },
    "content": {
    "application/json": {
    "schema": {
    "type": "string"
    }
    }
    }
    }
    }
    }
    }
    },
    "components": {
    "parameters": {
    "path_aoid": {
    "name": "aoid",
    "in": "path",
    "description": "a param",
    "required": true,
    "schema": {
    "$ref": "../../../common/associateOIDType_v01.json"
    }
    },
    "header_If-Match": {
    "name": "If-Match",
    "in": "header",
    "description": "If-Match caching policy",
    "required": true,
    "schema": {
    "type": "string"
    }
    }
    },
    "headers": {
    "ETag": {
    "description": "Defines the entity tag for use with the If-Match and If-None-Match request headers",
    "schema": {
    "type": "string"
    }
    },
    "Last-Modified": {
    "name": "Last-Modified",
    "in": "header",
    "description": "Specifies the date and time the representational state of the resource was last modified",
    "required": true,
    "schema": {
    "type": "string"
    }
    }
    }
    }
    }