捕梦者基础框架API接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
983 B

openapi: 3.0.0
info:
title: 'Example of using interfaces in swagger-php'
version: 1.0.0
paths:
'/products/{id}':
get:
tags:
- Products
operationId: 'UsingInterfaces\ProductController::getProduct'
parameters:
-
name: id
in: path
description: 'ID of product to return'
required: true
schema:
type: string
responses:
default:
description: 'successful operation'
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
components:
schemas:
Product:
title: 'Product model'
properties:
name:
description: 'The product name.'
example: toaster
id:
description: 'The unique identifier of a product in our catalog.'
type: integer
format: int64
example: 1
type: object
ProductInterface: { }