Swagger
.yaml
Metadata, API name and Description
swagger:
Every swagger document starts with Swagger version declarationinfo:
This is used to specify further metadata, such as:title
(required)version
(required)description
contact
name
url
license
name
url
URL definition
schemes:
This is an array of protocols supported by the API.host:
TbasePath:
The URL prefix for all the endpoints.
Paths
The paths:
object contains objects which are called the name of the endpoints, in the syntax: /rating
. Each of these has an object for each of the verbs it is to implement (i.e. post
, put
, etc.):
tags:
This is used to group related API endpoints.
paths:
Defines the enpoints of the API.
operationId:
-responses:
-- HTTP response number.
description:
schema:
- HTTP response number.
consumes:
produces:
description:
parameters:
Definitions
definitions
have the same goal as MSON: to make it easy to describe data structures and use them in API description.
-