iac_modules/app/python-demo/openapi.yaml
2025-03-24 21:12:20 +08:00

44 lines
918 B
YAML

openapi: 3.0.0
info:
title: Your API
version: 1.0.0
paths:
/:
get:
summary: Get a greeting message
operationId: index_view
responses:
'200':
description: Successful response
content:
application/json:
example:
message: Hello, world!
/user:
post:
summary: Create a user
operationId: create_user
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'200':
description: Successful response
content:
application/json:
example:
username: JohnDoe
age: 25
components:
schemas:
User:
type: object
properties:
username:
type: string
age:
type: integer