MCPcopy Index your code
hub / github.com/devfile/api

github.com/devfile/api @v2.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.3.0 ↗ · + Follow
1,484 symbols 3,342 edges 152 files 965 documented · 65%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kube-native API for cloud development workspaces specification

Apache License Contribute OpenSSF Best Practices OpenSSF Scorecard

Sources for this API are defined in Go code, starting from the devworkspace_types.go source file

From these Go sources, several files are generated:

  • A Kubernetes Custom Resource Definition(CRD) with an embedded OpenApi schema,
  • json schemas (in the schemas folder) generated from the above CRD, to specify the syntax of:
  • the DevWorkspace CRD itself;
  • the DevWorkspaceTemplate CRD (a devworkspace content, without runtime information);
  • the Devfile 2.0.0 format, which is generated from the DevWorkspace API.

Generated files are created by a build script (see section How to build).

Devfile 2.0.0 file format

A Subset of this DevWorkspace API defines a structure (workspace template content), which is also at the core of the Devfile 2.0 format specification. For more information about this, please look into the Devfile support README

The generated documentation of the Devfile 2.0 format, based on its json schema, is available here.

Typescript model is build on each commit of main branch and available as an NPM package.

Release

Release details and process are found in Devfile Release

How to build

For information about building this project visit CONTRIBUTING.md.

Specification status

This work is still in an early stage of specification, and the related API and schemas are still a draft proposal.

Quickly open and test ?

In order to test existing or new Devfile 2.0 or DevWorkspace sample files in a self-service Che workspace (hosted on che.openshift.io), just click on the button below:

Contribute

As soon as the devworkspace is opened, you should be able to:

  • open the yaml files in the following folders:
  • samples/
  • devfile-support/samples
  • have yaml language support (completion and documentation) based on the current Json schemas.

Contributing

Please see our contributing.md.

License

Apache License 2.0, see LICENSE for details.

Adding License Headers

license_header contains the license header to be contained under all source files. For Go sources, this can be included by running bash add_licenses.sh.

Ensure github.com/google/addlicense is installed by running go install github.com/google/addlicense@latest.

Extension points exported contracts — how you extend this code

Union (Interface)
+k8s:deepcopy-gen=false Union is an interface that allows managing structs defined as Kubernetes unions with discriminat [31 …
pkg/apis/workspaces/v1alpha2/union.go
DevfileValidator (Interface)
DevfileValidator interface implemented by the parser and api tests for verifying generated devfiles [1 implementers]
test/v200/utils/common/test_utils.go
Visitor (FuncType)
Visitor is the type of a function that visits one level of Json schema
generator/genutils/json_schema_edit.go
Keyed (Interface)
Keyed is expected to be implemented by the elements of the devfile top-level lists (such as Command, Component, Project, [15 …
pkg/apis/workspaces/v1alpha2/keyed.go
DevfileFollower (Interface)
DevfileFollower interface implemented by the parser tests for updating the parser data
test/v200/utils/common/test_utils.go
Union (Interface)
Union is an interface that allows managing structs defined as Kubernetes unions with discriminators, according to the fo [31 …
pkg/apis/workspaces/v1alpha1/union.go
Keyed (Interface)
+k8s:deepcopy-gen=false [15 implementers]
pkg/apis/workspaces/v1alpha1/keyed.go
TopLevelListContainer (Interface)
TopLevelListContainer is an interface that allows retrieving the devfile top-level lists from an object. Main implemento [4 …
pkg/apis/workspaces/v1alpha2/keyed.go

Core symbols most depended-on inside this repo

LogInfoMessage
called by 134
test/v200/utils/common/test_utils.go
GetRandomNumber
called by 76
test/v200/utils/common/test_utils.go
GetBinaryDecision
called by 54
test/v200/utils/common/test_utils.go
GetRandomString
called by 52
test/v200/utils/common/test_utils.go
checkForInvalidError
called by 46
pkg/validation/variables/utils.go
Error
called by 44
pkg/validation/errors.go
Get
called by 41
pkg/attributes/attributes.go
validateAndReplaceDataWithVariable
called by 36
pkg/validation/variables/variables.go

Shape

Method 837
Struct 319
Function 253
TypeAlias 59
Interface 8
Class 5
FuncType 3

Languages

Go99%
Python1%

Modules by API surface

pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go368 symbols
pkg/apis/workspaces/v1alpha2/zz_generated.union_definitions.go120 symbols
pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go114 symbols
pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go102 symbols
pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go46 symbols
pkg/validation/errors.go39 symbols
test/v200/utils/common/test_utils.go37 symbols
pkg/apis/workspaces/v1alpha1/union_definitions.go35 symbols
pkg/attributes/attributes.go27 symbols
test/v200/utils/common/project_test_utils.go17 symbols
test/v200/utils/common/parent_project_test_utils.go16 symbols
test/v200/apiTest/api_test.go15 symbols

For agents

$ claude mcp add api \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact