ข้ามไปยังเนื้อหา

เอกสารอ้างอิงการกำหนดค่า

พฤติกรรมทั้งหมดของ pipeline ถูกควบคุมโดยไฟล์ YAML สองไฟล์ใน config/

api:
base_url: "https://example-tenant.console.ves.volterra.io"
tenant: "example-tenant"
namespace: "example-namespace"
timeout: 30
retries: 3
retry_delay: 2
ฟิลด์คำอธิบาย
base_urlURL พื้นฐานของ API คอนโซล F5 XC สามารถแทนที่ด้วยตัวแปรสภาพแวดล้อม F5XC_API_URL
tenantชื่อ tenant ที่ใช้ในเส้นทาง API
namespacenamespace เริ่มต้นสำหรับการดำเนินการ CRUD
timeoutระยะเวลาหมดเวลาของคำขอ HTTP เป็นวินาที
retriesจำนวนครั้งในการลองใหม่เมื่อเกิดความล้มเหลว
retry_delayจำนวนวินาทีระหว่างการลองใหม่แต่ละครั้ง
download:
url: "https://docs.cloud.f5.com/docs-v2/downloads/f5-distributed-cloud-open-api.zip"
output_dir: "specs/original"
etag_cache: ".etag_cache"
ฟิลด์คำอธิบาย
urlURL ของชุด OpenAPI spec อย่างเป็นทางการของ F5 XC (ZIP)
output_dirตำแหน่งที่จัดเก็บ spec ที่แตกไฟล์แล้ว
etag_cacheไฟล์ที่จัดเก็บ HTTP ETag สำหรับการดาวน์โหลดแบบมีเงื่อนไข

สิบหมวดหมู่ที่สอดคล้องกับประเภทข้อจำกัดของ OpenAPI schema แต่ละหมวดหมู่สามารถเปิด/ปิดใช้งานได้อย่างอิสระ

validation_categories:
string_length:
enabled: true
keywords: ["minLength", "maxLength"]
description: "Validate string length boundaries"
หมวดหมู่คีย์เวิร์ด
string_lengthminLength, maxLength
patternpattern
numeric_boundsminimum, maximum, exclusiveMinimum, exclusiveMaximum
required_fieldsrequired
enum_valuesenum
array_boundsminItems, maxItems, uniqueItems
object_structureadditionalProperties, properties, propertyNames
compositiononeOf, anyOf, allOf
dependenciesdependentRequired, dependentSchemas
data_typestype, format
schemathesis:
enabled: true
max_examples: 100
hypothesis_phases:
- generate
- target
stateful_testing: true
base_url_override: null
auth_header: "Authorization"
auth_prefix: "APIToken"
ฟิลด์คำอธิบาย
enabledเปิด/ปิดการทดสอบ Schemathesis
max_examplesจำนวนสูงสุดของกรณีทดสอบที่สร้างขึ้นต่อ operation
hypothesis_phasesเฟสของ Hypothesis ที่จะรัน (generate, target)
stateful_testingเปิดใช้การทดสอบแบบ stateful ที่อิงตาม link ข้าม operation
base_url_overrideแทนที่ URL พื้นฐานของ API สำหรับการทดสอบ null จะใช้ api.base_url
auth_headerชื่อ HTTP header สำหรับการยืนยันตัวตน
auth_prefixรูปแบบ prefix ของ token (คำขอจะถูกส่งเป็น APIToken <token>)
reconciliation:
priority:
- existing
- discovery
- inferred
fix_strategies:
tighter_spec: "relax"
looser_spec: "tighten"
missing_constraint: "add"
extra_constraint: "remove"
ฟิลด์คำอธิบาย
priorityลำดับความสำคัญเมื่อแหล่งข้อมูลหลายแหล่งไม่ตรงกัน
fix_strategiesแมปประเภทความไม่สอดคล้องแต่ละประเภทกับการดำเนินการแก้ไข ดู การแก้ไขที่ใช้
spectral:
enabled: true
ruleset: "spectral-pipeline.yaml"
auto_fix:
oas3-api-servers: true
info-contact: true
operation-tags: true
oas3-unused-component: true
operation-operationId-unique: true
oas3-valid-schema-example: true
no-script-tags-in-markdown: true
gate:
max_errors: null
max_warnings: null
contact:
name: "F5 Distributed Cloud"
url: "https://docs.cloud.f5.com"
email: "support@f5.com"
servers:
- url: "https://{tenant}.console.ves.volterra.io"
description: "F5 Distributed Cloud API"
variables:
tenant:
default: "example-tenant"
description: "Your F5 XC tenant name"
security_scheme:
type: "apiKey"
in: "header"
name: "Authorization"
description: "F5 XC API Token (format: APIToken <token>)"
ฟิลด์คำอธิบาย
enabledเปิด/ปิดการ lint ด้วย Spectral ทั้งหมด
rulesetไฟล์กำหนดค่า Spectral ที่จะใช้ (pipeline ใช้ spectral-pipeline.yaml)
auto_fixแมปชื่อกฎกับค่า boolean true หมายความว่า reconciler จะแก้ไขการละเมิดกฎ
gate.max_errorsจำนวน error สูงสุดที่อนุญาตใน gate หลังการปรับปรุง null จะปิดใช้งานการตรวจสอบ
gate.max_warningsจำนวน warning สูงสุดที่อนุญาต null จะปิดใช้งานการตรวจสอบ
contactข้อมูลติดต่อที่ถูกใส่ลงใน info.contact โดย fixer info-contact
serversอาร์เรย์ servers ที่ถูกใส่โดย fixer oas3-api-servers
security_schemeคำจำกัดความ security scheme ที่ถูกใส่ลงในทุก spec
reports:
output_dir: "reports"
formats:
- json
- html
- markdown
include_examples: true
max_examples_per_issue: 5
release:
output_dir: "release"
include_changelog: true
include_validation_report: true
version_from: "git"
ฟิลด์คำอธิบาย
output_dirไดเรกทอรีสำหรับ artifact ของการเผยแพร่
include_changelogรวม CHANGELOG.md ในแพ็คเกจเผยแพร่
include_validation_reportรวมรายงานการตรวจสอบในแพ็คเกจเผยแพร่
version_fromแหล่งที่มาของเวอร์ชัน git จะคำนวณเวอร์ชันจากวันที่ metadata ของ spec + หมายเลข patch

กำหนด endpoint พื้นฐานที่ใช้สำหรับการตรวจสอบ API แบบ live แต่ละรายการแมปชื่อทรัพยากรเชิงตรรกะกับไฟล์ spec, กลุ่ม API และเส้นทาง CRUD

endpoints:
healthcheck:
resource: healthchecks
domain_file: docs-cloud-f5-com.0124.public.ves.io.schema.healthcheck.ves-swagger.json
api_group: config
crud_operations:
create: POST /api/config/namespaces/{namespace}/healthchecks
read: GET /api/config/namespaces/{namespace}/healthchecks/{name}
list: GET /api/config/namespaces/{namespace}/healthchecks
update: PUT /api/config/namespaces/{namespace}/healthchecks/{name}
delete: DELETE /api/config/namespaces/{namespace}/healthchecks/{name}
test_priority: high
description: "Health check configurations for origin monitoring"
ฟิลด์คำอธิบาย
resourceชื่อทรัพยากร API (ใช้ในเส้นทาง URL)
domain_fileชื่อไฟล์ของ OpenAPI spec ใน specs/original/
api_groupprefix กลุ่ม API (config, web ฯลฯ)
crud_operationsHTTP method และเส้นทางสำหรับแต่ละการดำเนินการ CRUD
test_priorityhigh, medium หรือ low — ควบคุมลำดับการรันทดสอบ
descriptionคำอธิบายทรัพยากรที่มนุษย์อ่านได้

10 endpoint ข้ามสามโดเมน:

Endpointโดเมนลำดับความสำคัญ
healthcheckVirtualhigh
origin_poolVirtualhigh
app_firewallVirtualhigh
service_policyVirtualmedium
api_definitionAPI Securityhigh
api_discoveryAPI Securitymedium
api_groupsAPI Securitymedium
code_base_integrationAPI Securitylow
data_typeData Privacymedium
sensitive_data_policyData Privacymedium

ในการเพิ่ม endpoint ใหม่สำหรับการตรวจสอบ:

  1. ค้นหาชื่อไฟล์ spec ใน specs/original/ (รูปแบบ: docs-cloud-f5-com.NNNN.*.ves-swagger.json)
  2. เพิ่มรายการภายใต้ endpoints: ตามโครงสร้างด้านบน
  3. เพิ่มการแมปไฟล์โดเมนภายใต้ domain_files: พร้อมหมายเลขลำดับความสำคัญ
  4. เพิ่มชื่อ endpoint ลงใน test_order: ในตำแหน่งที่ต้องการ