UNPKG

@readme/oas-examples

Version:

A collection of example OpenAPI 3.x and Swagger 2.0 documents.

65 lines (64 loc) 2.04 kB
openapi: 3.0.0 info: description: This is a sample definition to test unique HTTP behavior. version: 1.0.0 title: HTTP test license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html servers: - url: http://httpbin.org paths: '/cache': get: summary: Load a file with caching headers description: Making this request without these parameters should make an uncached request. When you provide `if-modified-since` or `if-none-match` you should return a `304 Not Modified`. operationId: cached parameters: - name: If-Modified-Since in: header description: An RFC 3339 formatted `date-time` string, preferably in UTC. If the resource was last updated before the provided `date-time`, the server should return a `304 Not Modified` response, otherwise a 200 with an accurate `last-modified` time. required: false schema: type: string format: date-time - name: If-None-Match in: header description: If you provide a value here, it will be checked against the generated ETAG of the target resource. If they match, you'll get a `304 Not Modified` response, otherwise a `200 OK` with a new ETAG. required: false schema: type: string responses: default: description: successful response security: - api_key: [] '/status/302': get: summary: Redirect description: Returns a `302 Found` status operationId: redirect responses: default: description: successful response security: - api_key: [] '/status/204': get: summary: No content description: Returns a `204 No Content` with no body operationId: nocontent responses: default: description: successful response security: - api_key: [] x-readme: proxy-enabled: false