- examples/custom.yaml: Custom YAML format example - examples/postman.yaml: Postman Collection v2.1 example - examples/openapi.yaml: OpenAPI 3.0 example
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
openapi: "3.0.0"
|
|
info:
|
|
title: "Test API"
|
|
version: "1.0.0"
|
|
|
|
servers:
|
|
- url: http://localhost:8080
|
|
|
|
paths:
|
|
/api/login:
|
|
post:
|
|
operationId: "loginUser"
|
|
summary: "Login user"
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
email:
|
|
type: string
|
|
password:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: "Success"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
token:
|
|
type: string
|
|
|
|
/api/profile:
|
|
get:
|
|
operationId: "getProfile"
|
|
summary: "Get user profile"
|
|
responses:
|
|
"200":
|
|
description: "Success"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
email:
|
|
type: string
|