Release 0.2.0

Complete OpenAPI 3.0/3.1 generation, diagnostics, lifecycle safety, enum and naming mappings, bilingual documentation, examples, and pub.dev release validation.
This commit is contained in:
mr.koi
2026-07-31 16:47:39 +08:00
parent ea93f09154
commit 454e6c51d7
56 changed files with 14506 additions and 491 deletions
+78
View File
@@ -0,0 +1,78 @@
openapi: 3.0.3
info:
title: Pet Store example
version: 1.0.0
servers:
- url: https://api.example.com/v1
tags:
- name: Pets
paths:
/pets:
get:
tags:
- Pets
operationId: listPets
summary: List pets
parameters:
- name: limit
in: query
required: false
schema:
type: integer
format: int32
minimum: 1
responses:
'200':
description: A list of pets
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
/pets/{petId}:
get:
tags:
- Pets
operationId: getPet
summary: Get a pet by ID
parameters:
- name: petId
in: path
required: true
schema:
type: string
responses:
'200':
description: The requested pet
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
'404':
description: Pet not found
components:
schemas:
Pet:
type: object
required:
- id
- name
- status
properties:
id:
type: string
name:
type: string
status:
$ref: '#/components/schemas/PetStatus'
PetStatus:
type: string
enum:
- available
- pending
- sold
x-enumNames:
- available
- pendingReview
- sold