98 lines
3.3 KiB
YAML
98 lines
3.3 KiB
YAML
# =============================================================================
|
|
# XRD (Composite Resource Definition)
|
|
# Définit le schéma de ton API personnalisée
|
|
# =============================================================================
|
|
apiVersion: apiextensions.crossplane.io/v2
|
|
kind: CompositeResourceDefinition
|
|
metadata:
|
|
# Format: x<pluriel>.<group>
|
|
# Exemple: xdatabases.mathod.io, xnetworks.mathod.io
|
|
name: x<RESOURCE_PLURAL>s.mathod.io
|
|
spec:
|
|
scope: Namespaced
|
|
|
|
# Le groupe de ton API (doit matcher le suffix du name)
|
|
group: mathod.io
|
|
|
|
names:
|
|
# Nom au singulier (PascalCase) - Commence par X
|
|
kind: X<ResourceName>
|
|
# Nom au pluriel (lowercase)
|
|
plural: x<resource_name>s
|
|
|
|
versions:
|
|
- name: v1alpha1
|
|
served: true
|
|
referenceable: true
|
|
schema:
|
|
openAPIV3Schema:
|
|
type: object
|
|
properties:
|
|
spec:
|
|
type: object
|
|
properties:
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
# ========================================
|
|
# Paramètres string
|
|
# ========================================
|
|
<paramName>:
|
|
type: string
|
|
description: "<Description du paramètre>"
|
|
default: "<valeur_par_defaut>"
|
|
|
|
# ========================================
|
|
# Paramètres boolean
|
|
# ========================================
|
|
<boolParam>:
|
|
type: boolean
|
|
description: "<Description du paramètre>"
|
|
default: false
|
|
|
|
# ========================================
|
|
# Paramètres integer
|
|
# ========================================
|
|
<intParam>:
|
|
type: integer
|
|
description: "<Description du paramètre>"
|
|
default: 100
|
|
|
|
# ========================================
|
|
# Paramètres array
|
|
# ========================================
|
|
<arrayParam>:
|
|
type: array
|
|
description: "<Description du paramètre>"
|
|
items:
|
|
type: string
|
|
default: []
|
|
|
|
# ========================================
|
|
# Paramètres object
|
|
# ========================================
|
|
<objectParam>:
|
|
type: object
|
|
description: "<Description du paramètre>"
|
|
properties:
|
|
<subField>:
|
|
type: string
|
|
|
|
# Paramètres obligatoires
|
|
required:
|
|
- <paramName>
|
|
|
|
required:
|
|
- parameters
|
|
|
|
# ========================================
|
|
# Status - Informations retournées
|
|
# ========================================
|
|
status:
|
|
type: object
|
|
properties:
|
|
<outputField>:
|
|
type: string
|
|
description: "<Description de la sortie>"
|
|
|
|
--- |