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: 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
Download from the command line
curl -L -o openapi.yaml https://files.samplefiles.com/data/openapi/openapi.yamlwget https://files.samplefiles.com/data/openapi/openapi.yamlhttps://files.samplefiles.com/data/openapi/openapi.yamlprintf '%s %s\n' 8a12131aa72c1d21f4131a1897cfb25e760b8d5e35bc2fd5ce104c15fb197796 openapi.yaml | shasum -a 256 -cOr check the download in your browser with the checksum calculator.