API Documentation
According to actual business needs, we generally divide APIs into three types: standard K8S API, advanced API, and CRD (Custom Resource Definition). Therefore, the directory structure is usually organized as follows:
TOC
K8S API
kubernetes_apis/workload/daemonset.mdx
Refer to DaemonSet.
crds/ArtifactCleanupRun.mdx
Refer to ArtifactCleanupRun.
props
name: Reference name under OpenAPI schemadefinitions(v2) orcomponents/schemas(v3), or CRDmetadata.namenamespaced: Indicates whether the resource is namespace-scoped; defaults totrue, meaning the API Endpoints include the namespace path parameternamespaces/{namespace}pathPrefix: Can be used to override the global configurationapi.pathPrefixfilepath: Similar to specifying openapi path, used to specify a particular openapi or CRD fileapiGroup: Optional, specifies the API group; openapi will try to read the referencedx-kubernetes-group-version-kind, same belowapiVersion: Optional, specifies the API version; CRD will default to the first version inspec.versionsapiKind: Optional, specifies the API resource kind
Advanced API
advanced_apis/codeQualityTaskSummary.mdx
Refer to CodeQualityTaskSummary.
props
path: Path under OpenAPI schemapathspathPrefix: Can be used to override the global configurationapi.pathPrefixopenapiPath: See specifying openapi path
CRD (deprecated)
WARNING
Please use the K8sAPI component instead of the K8sCrd component. The K8sCrd component will be removed in future versions.
crds/ArtifactCleanupRun-K8sCrd.mdx
Refer to ArtifactCleanupRun-K8sCrd.
props
name: CRDmetadata.namecrdPath: Similar to specifying openapi path, used to specify a particular CRD file
Common References
references/CodeQuality.mdx
Refer to CodeQuality.
props
schema: Reference name under OpenAPI schemadefinitions(v2) orcomponents/schemas(v3)openapiPath: See specifying openapi path
Specifying openapi Path
For the OpenAPIPath and OpenAPIRef components, by default, all openapi definition files are searched until a match is found. If you need to specify a particular openapi file, you can use the openapiPath attribute: