API Reference Template
Data yaml to import and generate this template
openapi: 3.0.0
info:
title: API Title
description: A brief description of your API.
version: 1.0.0
contact:
name: API Support
url: http://www.example.com/support
email: [email protected]
servers:
- url: https://api.example.com/v1
description: Production server
- url: https://api-staging.example.com/v1
description: Staging server
tags:
- name: Tag1
description: Description for Tag1
- name: Tag2
description: Description for Tag2
paths:
/path1:
get:
tags:
- Tag1
summary: Summary of the GET operation
description: Description of the GET operation
parameters:
- name: parameter1
in: query
required: true
description: Description of parameter1
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
property1:
type: string
example: example_value
property2:
type: integer
example: 123
'400':
description: Bad request
'500':
description: Internal server error
/path2:
post:
tags:
- Tag2
summary: Summary of the POST operation
description: Description of the POST operation
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
property1:
type: string
example: example_value
property2:
type: integer
example: 123
responses:
'201':
description: Successfully created
'400':
description: Bad request
'500':
description: Internal server error
components:
schemas:
Schema1:
type: object
properties:
property1:
type: string
property2:
type: integer
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-KEY
security:
- ApiKeyAuth: []
externalDocs:
description: Find more info here
url: http://example.com
Last updated