API Documentation

Based on actual business needs, we generally categorize APIs into two types: Advanced APIs and CRDs (Custom Resource Definitions). Therefore, the directory structure is typically organized as follows:

│── apis
   ├── advanced-apis # Advanced APIs
   ├── crds # CRDs
   └── references # Common References

TOC

Advanced APIs

advanced-apis/codeQualityTaskSummary.mdx
# CodeQualityTaskSummary

<OpenAPIPath path="/plugins/v1alpha1/template/codeQuality/task/{task-id}/summary" />

Refer to CodeQualityTaskSummary.

props

  • path: The path under OpenAPI schema paths
  • pathPrefix: Can be used to override the api.pathPrefix in global configuration
  • openapiPath: Refer to Specifying OpenAPI Path

CRD

crds/ArtifactCleanupRun.mdx
# ArtifactCleanupRun

<K8sCrd name="artifactcleanupruns.artifacts.katanomi.dev" />

Refer to ArtifactCleanupRun.

props

Common References

references/CodeQuality.mdx
# CodeQuality

<OpenAPIRef schema="v1alpha1.CodeQuality" />

Refer to CodeQuality.

props

  • schema: The name under OpenAPI schema definitions(v2) or components/schemas(v3)
  • openapiPath: Refer to Specifying OpenAPI Path

Specifying OpenAPI Path

For the OpenAPIPath and OpenAPIRef components, the default behavior is to search for matches across all OpenAPI definition files. If you need to specify a particular OpenAPI file, you can use the openapiPath property:

<OpenAPIPath
  path="/plugins/v1alpha1/template/codeQuality/task/{task-id}/summary"
  openapiPath="shared/openapis/katanomi.json"
/>