Slide 35
Slide 35 text
第6章 +α Arazzoスキーマによるフロー定義
openapi.yaml
arazzo.yaml
arazzo: 1.0.1
info: ... # Pet Adoption Workflow (Strict)
sourceDescriptions:
- name: petAdoptionAPI
url: ./openapi.yaml
type: openapi
openapi: 3.0.3
info: ...
paths:
/pets:
get:
summary: Search available pets by type
parameters: [...]
responses:
'200': ... # List of matching pets
'503': ... # Service temporarily unavailable
workflows:
- workflowId: pet-adoption-workflow
inputs: [...] # petType (cat/dog), ownerId (UUID)
フロー組込
/background-checks/{ownerId}:
post:
summary: Submit a background check for a prospective owner
parameters: [...]
responses:
'201': ... # Background check submitted
'504': ... # Gateway timeout
components:
schemas:
Pet: ...
# id, name, type [cat, dog]
BackgroundCheckResult: ... # status [approved, rejected,
pending]
steps:
- stepId: search-pets
operationId: petAdoptionAPI.searchPets
parameters: ... # type = $inputs.petType
successCriteria: ... # 200 OK & pets配列に要素あり
onFailure:
- retry: 503エラー時(最大 3回リトライ)
- end: 該当ペットなし等で終了
outputs:
availablePets: $response.body
- stepId: background-check
operationId: petAdoptionAPI.submitBackgroundCheck
parameters: ... # ownerId = $inputs.ownerId
successCriteria: ... # 201 Created & status == 'approved'
onFailure:
- end: status == 'rejected' で終了
- retry: 504タイムアウト時(最大 2回リトライ)
35