Data · 1 file

Sample OpenAPI File

An OpenAPI 3.1 (Swagger) definition describing a REST API, ready for Swagger UI, Redoc or code generators.

OpenAPI · 1.8 KB

OpenAPI 3.1 definition

A small OpenAPI 3.1 spec (list, create and get customers) with parameters, request bodies, $ref schemas and bearer auth.

CC0 · free for any use · Verified by an independent tool · Report a problem

openapi.yaml — first linesYAML
openapi: 3.1.0
info:
  title: Sample Customers API
  version: 1.0.0
  description: An example API definition from samplefiles.com.
servers:
  - url: https://api.example.com/v1
paths:
  /customers:
    get:
      summary: List customers
      parameters:
        - { name: limit, in: query, schema: { type: integer, default: 20, maximum: 100 } }
        - { name: cursor, in: query, schema: { type: string } }
      responses:
        '200':
          description: A page of customers
          content:
            application/json:
              schema:
                type: object
                properties:
                  data: { type: array, items: { $ref: '#/components/schemas/Customer' } }
                  next_cursor: { type: [string, 'null'] }
    post:

File details

Size
1.8 KB (1,871 bytes)
MIME type
application/yaml
SHA-256
8a12131aa72c1d21f4131a1897cfb25e760b8d5e35bc2fd5ce104c15fb197796
MD5
0d38fd710c9a7b9f422dfce3003d9469

Download from the command line

curl -L -o openapi.yaml https://files.samplefiles.com/data/openapi/openapi.yaml

Or check the download in your browser with the checksum calculator.