خذ الملف التالي:
```yaml
apiVersion: pkg.crossplane.io/v1
kind: ProviderConfig
metadata:
name: example-provider
spec: {}
---
apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition
metadata:
name: xpostgresqlinstances.example.org
spec:
group: example.org
names:
kind: XPostgreSQLInstance
plural: xpostgresqlinstances
versions:
- name: v1alpha1
served: true
referenceable: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
storageGB:
type: integer
---
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: example-composition
spec:
compositeTypeRef:
apiVersion: example.org/v1alpha1
kind: XPostgreSQLInstance
resources:
- name: rds
base:
apiVersion: rds.aws.upbound.io/v1beta1
kind: Instance
spec:
forProvider:
region: us-east-1
dbInstanceClass: db.t3.small
allocatedStorage: 20
engine: PostgreSQL
engineVersion: "14"
masterUsername: admin
masterUserPasswordSecretRef:
name: db-password
namespace: crossplane-system
skipFinalSnapshot: true
---
apiVersion: rds.aws.upbound.io/v1beta1
kind: Instance
metadata:
name: example-rds
spec:
forProvider:
region: us-east-1
dbInstanceClass: db.t3.small
allocatedStorage: 20
engine: PostgreSQL
engineVersion: "14"
masterUsername: admin
masterUserPasswordSecretRef:
name: db-password
namespace: crossplane-system
skipFinalSnapshot: true
```
في هذا الملف، لدينا 4 مستندات مفصولة بـ `---`، لكن المستند الثالث (Composition) يحتوي على apiVersion داخلي داخل `resources`. لكن هذا apiVersion الداخلي ليس في بداية السطر (هو متداخل في مسافة بادئة)، لذا لن تحتسبه الحاسبة. السطور التي تبدأ بـ apiVersion في بداية السطر: الأول، الثاني، الثالث (بداية Composition)، والرابع. إذن العدد هو 4. لكن لاحظ أن المستند الثالث (Composition) يحتوي على apiVersion في سطره الأول، لذا يحتسب. النتيجة النهائية: 4 موارد.