diff --git a/multiuser/permission/che-multiuser-permission-devfile/src/test/java/org/eclipse/che/multiuser/permission/devfile/server/filters/UserDevfilePermissionsFilterTest.java b/multiuser/permission/che-multiuser-permission-devfile/src/test/java/org/eclipse/che/multiuser/permission/devfile/server/filters/UserDevfilePermissionsFilterTest.java deleted file mode 100644 index 2f206e162e..0000000000 --- a/multiuser/permission/che-multiuser-permission-devfile/src/test/java/org/eclipse/che/multiuser/permission/devfile/server/filters/UserDevfilePermissionsFilterTest.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright (c) 2012-2021 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.multiuser.permission.devfile.server.filters; - -import static io.restassured.RestAssured.given; -import static org.eclipse.che.api.workspace.server.devfile.Constants.CURRENT_API_VERSION; -import static org.everrest.assured.JettyHttpServer.ADMIN_USER_NAME; -import static org.everrest.assured.JettyHttpServer.ADMIN_USER_PASSWORD; -import static org.everrest.assured.JettyHttpServer.SECURE_PATH; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.lenient; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.testng.Assert.assertEquals; - -import io.restassured.response.Response; -import java.util.Collections; -import java.util.HashSet; -import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.core.ForbiddenException; -import org.eclipse.che.api.core.NotFoundException; -import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.rest.ApiExceptionMapper; -import org.eclipse.che.api.core.rest.CheJsonProvider; -import org.eclipse.che.api.devfile.server.DevfileService; -import org.eclipse.che.api.devfile.server.UserDevfileManager; -import org.eclipse.che.api.devfile.server.model.impl.UserDevfileImpl; -import org.eclipse.che.api.devfile.shared.dto.UserDevfileDto; -import org.eclipse.che.api.workspace.server.devfile.DevfileEntityProvider; -import org.eclipse.che.api.workspace.server.devfile.DevfileParser; -import org.eclipse.che.api.workspace.server.devfile.DevfileVersionDetector; -import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileIntegrityValidator; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValidator; -import org.eclipse.che.commons.env.EnvironmentContext; -import org.eclipse.che.commons.subject.Subject; -import org.eclipse.che.multiuser.permission.devfile.server.TestObjectGenerator; -import org.eclipse.che.multiuser.permission.devfile.server.UserDevfileDomain; -import org.everrest.assured.EverrestJetty; -import org.everrest.core.Filter; -import org.everrest.core.GenericContainerRequest; -import org.everrest.core.RequestFilter; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.testng.MockitoTestNGListener; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -/** Tests for {@link UserDevfilePermissionsFilter}. */ -@Listeners(value = {EverrestJetty.class, MockitoTestNGListener.class}) -public class UserDevfilePermissionsFilterTest { - private static final String USERNAME = "userok"; - - ApiExceptionMapper mapper; - - CheJsonProvider jsonProvider = new CheJsonProvider(new HashSet<>()); - private DevfileEntityProvider devfileEntityProvider = - new DevfileEntityProvider( - new DevfileParser( - new DevfileSchemaValidator(new DevfileSchemaProvider(), new DevfileVersionDetector()), - new DevfileIntegrityValidator(Collections.emptyMap()))); - - @SuppressWarnings("unused") - private static final EnvironmentFilter FILTER = new EnvironmentFilter(); - - @Mock private static Subject subject; - - @Mock private UserDevfileManager userDevfileManager; - - private UserDevfilePermissionsFilter permissionsFilter; - - @Mock private DevfileService devfileService; - private UserDevfileDto userDevfileDto = TestObjectGenerator.createUserDevfileDto(); - private UserDevfileImpl userDevfile = - new UserDevfileImpl(userDevfileDto, TestObjectGenerator.TEST_ACCOUNT); - // - @BeforeMethod - public void setUp() throws Exception { - lenient().when(subject.getUserName()).thenReturn(USERNAME); - lenient().when(userDevfileManager.getById(any())).thenReturn(userDevfile); - - permissionsFilter = spy(new UserDevfilePermissionsFilter(userDevfileManager)); - - lenient() - .doThrow(new ForbiddenException("")) - .when(subject) - .checkPermission(anyString(), anyString(), anyString()); - } - - @Test - public void shouldNotCheckAnyPermissionOnDevfileCreate() { - // given - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .body(userDevfileDto) - .when() - .post(SECURE_PATH + "/devfile/"); - // then - assertEquals(response.getStatusCode(), 204); - verifyNoMoreInteractions(subject); - } - - @Test - public void shouldNotCheckAnyPermissionOnDevfileSearch() - throws BadRequestException, ForbiddenException, NotFoundException, ServerException { - // given - Mockito.when(devfileService.getUserDevfiles(any(), any(), any())) - .thenReturn(jakarta.ws.rs.core.Response.ok().build()); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .get(SECURE_PATH + "/devfile/search"); - // then - assertEquals(response.getStatusCode(), 200); - verifyNoMoreInteractions(subject); - } - - @Test - public void shouldNotCheckAnyPermissionOnDevfileSchema() - throws NotFoundException, ServerException { - // given - Mockito.when(devfileService.getSchema(CURRENT_API_VERSION)) - .thenReturn(jakarta.ws.rs.core.Response.ok().build()); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .get(SECURE_PATH + "/devfile"); - // then - assertEquals(response.getStatusCode(), 200); - verifyNoMoreInteractions(subject); - } - - @Test - public void shouldCheckReadPermissionsOnFetchingUserDevfileById() throws Exception { - // given - Mockito.when(devfileService.getById(eq(userDevfileDto.getId()))).thenReturn(userDevfileDto); - doNothing() - .when(subject) - .checkPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.READ)); - - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .when() - .get(SECURE_PATH + "/devfile/" + userDevfileDto.getId()); - // then - assertEquals(response.getStatusCode(), 200); - verify(devfileService).getById(eq(userDevfileDto.getId())); - verify(permissionsFilter) - .doCheckPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.READ)); - } - - @Test - public void shouldBeAbleToFailOnCheckPermissionDevfileReadByID() throws ForbiddenException { - // given - doThrow(new ForbiddenException("forbidden")) - .when(subject) - .checkPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.READ)); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .get(SECURE_PATH + "/devfile/" + userDevfileDto.getId()); - // then - assertEquals(response.getStatusCode(), 403); - verify(permissionsFilter) - .doCheckPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.READ)); - } - - @Test - public void shouldChecksPermissionDevfileUpdate() throws ForbiddenException { - // given - doNothing() - .when(subject) - .checkPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.UPDATE)); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .body(userDevfileDto) - .when() - .put(SECURE_PATH + "/devfile/" + userDevfileDto.getId()); - // then - assertEquals(response.getStatusCode(), 204); - verify(permissionsFilter) - .doCheckPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.UPDATE)); - } - - @Test - public void shouldBeAbleToFailOnCheckPermissionDevfileUpdate() throws ForbiddenException { - // given - doThrow(new ForbiddenException("forbidden")) - .when(subject) - .checkPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.UPDATE)); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .body(userDevfileDto) - .when() - .put(SECURE_PATH + "/devfile/" + userDevfileDto.getId()); - // then - assertEquals(response.getStatusCode(), 403); - verify(permissionsFilter) - .doCheckPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.UPDATE)); - } - - @Test - public void shouldChecksPermissionDevfileDelete() throws ForbiddenException { - // given - doNothing() - .when(subject) - .checkPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.DELETE)); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .delete(SECURE_PATH + "/devfile/" + userDevfileDto.getId()); - // then - assertEquals(response.getStatusCode(), 204); - verify(permissionsFilter) - .doCheckPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.DELETE)); - } - - @Test - public void shouldBeAbleToFailOnCheckPermissionDevfileDelete() throws ForbiddenException { - // given - doThrow(new ForbiddenException("forbidden")) - .when(subject) - .checkPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.DELETE)); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .delete(SECURE_PATH + "/devfile/" + userDevfileDto.getId()); - - // then - assertEquals(response.getStatusCode(), 403); - verify(permissionsFilter) - .doCheckPermission( - eq(UserDevfileDomain.DOMAIN_ID), - eq(userDevfileDto.getId()), - eq(UserDevfileDomain.DELETE)); - } - - @Filter - public static class EnvironmentFilter implements RequestFilter { - public void doFilter(GenericContainerRequest request) { - EnvironmentContext.getCurrent().setSubject(subject); - } - } -} diff --git a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java b/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java index c474e42d8c..130fc127ec 100644 --- a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java +++ b/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2022 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -12,53 +12,26 @@ package org.eclipse.che.api.devfile.server; import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; -import static java.util.stream.Collectors.toList; -import static org.eclipse.che.api.devfile.server.DtoConverter.asDto; import static org.eclipse.che.api.workspace.server.devfile.Constants.CURRENT_API_VERSION; import static org.eclipse.che.api.workspace.server.devfile.Constants.SUPPORTED_VERSIONS; -import com.google.common.base.Splitter; -import com.google.common.collect.ImmutableSet; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.DELETE; import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.PUT; import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Response; import java.io.FileNotFoundException; import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; import javax.inject.Inject; -import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.core.ConflictException; -import org.eclipse.che.api.core.ForbiddenException; import org.eclipse.che.api.core.NotFoundException; -import org.eclipse.che.api.core.Page; import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.model.workspace.devfile.UserDevfile; import org.eclipse.che.api.core.rest.Service; -import org.eclipse.che.api.devfile.shared.dto.UserDevfileDto; import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; -import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; -import org.eclipse.che.commons.lang.NameGenerator; -import org.eclipse.che.commons.lang.Pair; -import org.eclipse.che.commons.lang.URLEncodedUtils; -import org.eclipse.che.dto.server.DtoFactory; /** Defines Devfile REST API. */ @Tag(name = "devfile", description = "Devfile REST API") @@ -66,16 +39,9 @@ import org.eclipse.che.dto.server.DtoFactory; public class DevfileService extends Service { private final DevfileSchemaProvider schemaCachedProvider; - private final UserDevfileManager userDevfileManager; - private final DevfileServiceLinksInjector linksInjector; @Inject - public DevfileService( - DevfileSchemaProvider schemaCachedProvider, - UserDevfileManager userDevfileManager, - DevfileServiceLinksInjector linksInjector) { - this.userDevfileManager = userDevfileManager; - this.linksInjector = linksInjector; + public DevfileService(DevfileSchemaProvider schemaCachedProvider) { this.schemaCachedProvider = schemaCachedProvider; } @@ -116,236 +82,4 @@ public class DevfileService extends Service { throw new ServerException(e); } } - - @Path("/devfile") - @POST - @Consumes({APPLICATION_JSON, "text/yaml", "text/x-yaml"}) - @Produces(APPLICATION_JSON) - @Operation( - summary = "Creates a new persistent Devfile from yaml representation", - responses = { - @ApiResponse( - responseCode = "201", - description = "The devfile successfully created", - content = @Content(schema = @Schema(implementation = UserDevfileDto.class))), - @ApiResponse( - responseCode = "400", - description = "Missed required parameters, parameters are not valid"), - @ApiResponse( - responseCode = "403", - description = "The user does not have access to create a new devfile"), - @ApiResponse( - responseCode = "409", - description = "Conflict error occurred during the devfile creation"), - @ApiResponse(responseCode = "500", description = "Internal server error occurred") - }) - public Response createFromDevfileYaml( - @Parameter(description = "The devfile to create", required = true) DevfileDto devfile) - throws ConflictException, BadRequestException, ForbiddenException, NotFoundException, - ServerException { - requiredNotNull(devfile, "Devfile"); - return Response.status(201) - .entity( - linksInjector.injectLinks( - asDto( - userDevfileManager.createDevfile( - DtoFactory.newDto(UserDevfileDto.class) - .withDevfile(devfile) - .withName(NameGenerator.generate("devfile-", 16)))), - getServiceContext())) - .build(); - } - - @POST - @Consumes({APPLICATION_JSON}) - @Produces(APPLICATION_JSON) - @Operation( - summary = "Creates a new persistent Devfile", - responses = { - @ApiResponse( - responseCode = "201", - description = "The devfile successfully created", - content = @Content(schema = @Schema(implementation = UserDevfileDto.class))), - @ApiResponse( - responseCode = "400", - description = "Missed required parameters, parameters are not valid"), - @ApiResponse( - responseCode = "403", - description = "The user does not have access to create a new devfile"), - @ApiResponse( - responseCode = "409", - description = - "Conflict error occurred during the devfile creation" - + "(e.g. The devfile with such name already exists)"), - @ApiResponse(responseCode = "500", description = "Internal server error occurred") - }) - public Response createFromUserDevfile( - @Parameter(description = "The devfile to create", required = true) - UserDevfileDto userDevfileDto) - throws ConflictException, BadRequestException, ForbiddenException, NotFoundException, - ServerException { - requiredNotNull(userDevfileDto, "Devfile"); - return Response.status(201) - .entity( - linksInjector.injectLinks( - asDto(userDevfileManager.createDevfile(userDevfileDto)), getServiceContext())) - .build(); - } - - @GET - @Path("/{id}") - @Produces(APPLICATION_JSON) - @Operation( - summary = "Get devfile by its identifier", - responses = { - @ApiResponse( - responseCode = "200", - description = "The response contains requested workspace entity"), - @ApiResponse( - responseCode = "404", - description = "The devfile with specified id does not exist"), - @ApiResponse(responseCode = "403", description = "The user is not allowed to read devfile"), - @ApiResponse(responseCode = "500", description = "Internal server error occurred") - }) - public UserDevfileDto getById( - @Parameter(description = "UserDevfile identifier") @PathParam("id") String id) - throws NotFoundException, ServerException, ForbiddenException, BadRequestException { - requiredNotNull(id, "id"); - return linksInjector.injectLinks(asDto(userDevfileManager.getById(id)), getServiceContext()); - } - - @GET - @Path("search") - @Produces(APPLICATION_JSON) - @Operation( - summary = - "Get devfiles which user can read. This operation can be performed only by authorized user. " - + "It is possible to add additional constraints for the desired devfiles by specifying\n" - + "multiple query parameters that is representing fields of the devfile. All constrains\n" - + "would be combined with \"And\" condition. Also, it is possible to specify 'like:' prefix\n" - + "for the query parameters. In this case instead of an exact match would be used SQL pattern like search.\n" - + "Examples id=sdfsdf5&devfile.meta.name=like:%dfdf&", - responses = { - @ApiResponse( - responseCode = "200", - description = "The devfiles successfully fetched", - content = - @Content( - array = @ArraySchema(schema = @Schema(implementation = UserDevfileDto.class)))), - @ApiResponse( - responseCode = "500", - description = "Internal server error occurred during devfiles fetching") - }) - public Response getUserDevfiles( - @Parameter(description = "The number of the items to skip") - @DefaultValue("0") - @QueryParam("skipCount") - Integer skipCount, - @Parameter(description = "The limit of the items in the response, default is 30, maximum 60") - @DefaultValue("30") - @QueryParam("maxItems") - Integer maxItems, - @Parameter( - description = - "A list of fields and directions of sort. By default items would be sorted by id. Example id:asc,name:desc.") - @QueryParam("order") - String order) - throws ServerException, BadRequestException { - final Set skip = ImmutableSet.of("token", "skipCount", "maxItems", "order"); - Map> queryParams = URLEncodedUtils.parse(uriInfo.getRequestUri()); - final List> query = - queryParams.entrySet().stream() - .filter(param -> !param.getValue().isEmpty()) - .filter(param -> !skip.contains(param.getKey())) - .map(entry -> Pair.of(entry.getKey(), entry.getValue().iterator().next())) - .collect(toList()); - List> searchOrder = Collections.emptyList(); - if (order != null && !order.isEmpty()) { - try { - searchOrder = - Splitter.on(",") - .trimResults() - .omitEmptyStrings() - .withKeyValueSeparator(":") - .split(order) - .entrySet() - .stream() - .map(e -> Pair.of(e.getKey(), e.getValue())) - .collect(toList()); - } catch (IllegalArgumentException e) { - throw new BadRequestException("Invalid `order` query parameter format." + e.getMessage()); - } - } - Page userDevfilesPage = - userDevfileManager.getUserDevfiles(maxItems, skipCount, query, searchOrder); - - List list = - userDevfilesPage.getItems().stream() - .map(DtoConverter::asDto) - .map(dto -> linksInjector.injectLinks(asDto(dto), getServiceContext())) - .collect(toList()); - - return Response.ok().entity(list).header("Link", createLinkHeader(userDevfilesPage)).build(); - } - - @PUT - @Path("/{id}") - @Consumes(APPLICATION_JSON) - @Produces(APPLICATION_JSON) - @Operation( - summary = "Update the devfile by replacing all the existing data with update", - responses = { - @ApiResponse(responseCode = "200", description = "The devfile successfully updated"), - @ApiResponse( - responseCode = "400", - description = "Missed required parameters, parameters are not valid"), - @ApiResponse( - responseCode = "403", - description = "The user does not have access to update the devfile"), - @ApiResponse( - responseCode = "409", - description = - "Conflict error occurred during devfile update" - + "(e.g. Workspace with such name already exists)"), - @ApiResponse(responseCode = "500", description = "Internal server error occurred") - }) - public UserDevfileDto update( - @Parameter(description = "The devfile id") @PathParam("id") String id, - @Parameter(description = "The devfile update", required = true) UserDevfileDto update) - throws BadRequestException, ServerException, ForbiddenException, NotFoundException, - ConflictException { - requiredNotNull(update, "User Devfile configuration"); - update.setId(id); - return linksInjector.injectLinks( - asDto(userDevfileManager.updateUserDevfile(update)), getServiceContext()); - } - - @DELETE - @Path("/{id}") - @Operation( - summary = "Removes the devfile", - responses = { - @ApiResponse(responseCode = "204", description = "The devfile successfully removed"), - @ApiResponse( - responseCode = "403", - description = "The user does not have access to remove the devfile"), - @ApiResponse(responseCode = "500", description = "Internal server error occurred") - }) - public void delete(@Parameter(description = "The devfile id") @PathParam("id") String id) - throws BadRequestException, ServerException, ForbiddenException { - userDevfileManager.removeUserDevfile(id); - } - - /** - * Checks object reference is not {@code null} - * - * @param object object reference to check - * @param subject used as subject of exception message "{subject} required" - * @throws BadRequestException when object reference is {@code null} - */ - private void requiredNotNull(Object object, String subject) throws BadRequestException { - if (object == null) { - throw new BadRequestException(subject + " required"); - } - } } diff --git a/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceLinksInjectorTest.java b/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceLinksInjectorTest.java deleted file mode 100644 index b0613f6ced..0000000000 --- a/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceLinksInjectorTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012-2021 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.devfile.server; - -import static org.mockito.Mockito.when; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - -import jakarta.ws.rs.HttpMethod; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.UriBuilder; -import org.eclipse.che.api.core.rest.ServiceContext; -import org.eclipse.che.api.devfile.shared.Constants; -import org.eclipse.che.api.devfile.shared.dto.UserDevfileDto; -import org.eclipse.che.dto.server.DtoFactory; -import org.everrest.core.impl.uri.UriBuilderImpl; -import org.mockito.Mock; -import org.mockito.testng.MockitoTestNGListener; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -@Listeners(MockitoTestNGListener.class) -public class DevfileServiceLinksInjectorTest { - private static final String URI_BASE = "http://localhost:8080"; - private static final String SERVICE_PATH = "/devfile"; - - @Mock ServiceContext context; - - @BeforeMethod - public void setUp() { - final UriBuilder uriBuilder = new UriBuilderImpl(); - uriBuilder.uri(URI_BASE); - - when(context.getBaseUriBuilder()).thenReturn(uriBuilder); - } - - @Test - public void shouldInjectLinks() { - // given - final UserDevfileDto userDevfileDto = DtoFactory.newDto(UserDevfileDto.class).withId("id123"); - DevfileServiceLinksInjector linksInjector = new DevfileServiceLinksInjector(); - // when - final UserDevfileDto withLinks = linksInjector.injectLinks(userDevfileDto, context); - // then - assertEquals(withLinks.getLinks().size(), 1); - assertNotNull(withLinks.getLink(Constants.LINK_REL_SELF)); - assertEquals(withLinks.getLinks().get(0).getMethod(), HttpMethod.GET); - assertEquals(withLinks.getLinks().get(0).getHref(), URI_BASE + SERVICE_PATH + "/id123"); - assertEquals(withLinks.getLinks().get(0).getProduces(), MediaType.APPLICATION_JSON); - } -} diff --git a/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceTest.java b/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceTest.java index a7b0d7e6fa..e9cf0ecebe 100644 --- a/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceTest.java +++ b/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2022 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -12,12 +12,7 @@ package org.eclipse.che.api.devfile.server; import static io.restassured.RestAssured.given; -import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; -import static java.lang.String.format; -import static java.util.Collections.emptyList; -import static org.eclipse.che.api.devfile.server.TestObjectGenerator.TEST_ACCOUNT; import static org.eclipse.che.api.devfile.server.TestObjectGenerator.TEST_SUBJECT; -import static org.eclipse.che.api.devfile.server.TestObjectGenerator.USER_DEVFILE_ID; import static org.eclipse.che.api.workspace.server.devfile.Constants.CURRENT_API_VERSION; import static org.eclipse.che.api.workspace.server.devfile.Constants.SUPPORTED_VERSIONS; import static org.eclipse.che.dto.server.DtoFactory.newDto; @@ -25,38 +20,20 @@ import static org.everrest.assured.JettyHttpServer.ADMIN_USER_NAME; import static org.everrest.assured.JettyHttpServer.ADMIN_USER_PASSWORD; import static org.everrest.assured.JettyHttpServer.SECURE_PATH; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyInt; -import static org.mockito.ArgumentMatchers.anyList; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.lenient; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import io.restassured.response.Response; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; -import java.util.Map; -import org.eclipse.che.api.core.NotFoundException; -import org.eclipse.che.api.core.Page; -import org.eclipse.che.api.core.model.workspace.devfile.UserDevfile; import org.eclipse.che.api.core.notification.EventService; import org.eclipse.che.api.core.rest.ApiExceptionMapper; import org.eclipse.che.api.core.rest.CheJsonProvider; import org.eclipse.che.api.core.rest.ServiceContext; import org.eclipse.che.api.core.rest.WebApplicationExceptionMapper; -import org.eclipse.che.api.core.rest.shared.dto.ServiceError; -import org.eclipse.che.api.devfile.server.model.impl.UserDevfileImpl; import org.eclipse.che.api.devfile.server.spi.UserDevfileDao; import org.eclipse.che.api.devfile.shared.dto.UserDevfileDto; import org.eclipse.che.api.workspace.server.devfile.DevfileEntityProvider; @@ -68,16 +45,12 @@ import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValid import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; import org.eclipse.che.api.workspace.shared.dto.devfile.MetadataDto; import org.eclipse.che.commons.env.EnvironmentContext; -import org.eclipse.che.commons.lang.NameGenerator; -import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.dto.server.DtoFactory; import org.everrest.assured.EverrestJetty; import org.everrest.core.Filter; import org.everrest.core.GenericContainerRequest; import org.everrest.core.RequestFilter; -import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.mockito.Mockito; import org.mockito.stubbing.Answer; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.BeforeMethod; @@ -164,345 +137,12 @@ public class DevfileServiceTest { @BeforeMethod public void setup() { - this.userDevfileService = new DevfileService(schemaProvider, userDevfileManager, linksInjector); + this.userDevfileService = new DevfileService(schemaProvider); lenient() .when(linksInjector.injectLinks(any(UserDevfileDto.class), any(ServiceContext.class))) .thenAnswer((Answer) invocation -> invocation.getArgument(0)); } - @Test(dataProvider = "validUserDevfiles") - public void shouldCreateUserDevfileFromJson(UserDevfileDto userDevfileDto) throws Exception { - final UserDevfileImpl userDevfileImpl = - new UserDevfileImpl("id-123123", TEST_ACCOUNT, userDevfileDto); - - when(userDevfileManager.createDevfile(any(UserDevfile.class))).thenReturn(userDevfileImpl); - - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .body(DtoFactory.getInstance().toJson(userDevfileDto)) - .when() - .post(SECURE_PATH + "/devfile"); - - assertEquals(response.getStatusCode(), 201); - UserDevfileDto dto = unwrapDto(response, UserDevfileDto.class); - assertEquals(dto.getNamespace(), TEST_ACCOUNT.getName()); - assertEquals(new UserDevfileImpl(dto, TEST_ACCOUNT), userDevfileImpl); - verify(userDevfileManager).createDevfile(any(UserDevfile.class)); - } - - @Test(dataProvider = "invalidUserDevfiles") - public void shouldFailToCreateInvalidUserDevfileFromJson( - UserDevfileDto userDevfileDto, String expectedErrorMessage) throws Exception { - - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .body(DtoFactory.getInstance().toJson(userDevfileDto)) - .when() - .post(SECURE_PATH + "/devfile"); - - assertEquals(response.getStatusCode(), 400); - ServiceError error = unwrapDto(response, ServiceError.class); - assertNotNull(error); - assertEquals(error.getMessage(), expectedErrorMessage); - verifyNoMoreInteractions(userDevfileManager); - } - - @Test - public void shouldGetUserDevfileById() throws Exception { - final UserDevfileImpl userDevfile = TestObjectGenerator.createUserDevfile(); - when(userDevfileManager.getById(eq("id-22323"))).thenReturn(userDevfile); - - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .when() - .get(SECURE_PATH + "/devfile/id-22323") - .then() - .extract() - .response(); - - assertEquals(response.getStatusCode(), 200); - assertEquals( - new UserDevfileImpl(unwrapDto(response, UserDevfileDto.class), TEST_ACCOUNT), userDevfile); - verify(userDevfileManager).getById(eq("id-22323")); - verify(linksInjector).injectLinks(any(), any()); - } - - @Test - public void shouldThrowNotFoundExceptionWhenUserDevfileIsNotExistOnGetById() throws Exception { - - final String errMessage = format("UserDevfile with id %s is not found", USER_DEVFILE_ID); - doThrow(new NotFoundException(errMessage)).when(userDevfileManager).getById(anyString()); - - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .expect() - .statusCode(404) - .when() - .get(SECURE_PATH + "/devfile/" + USER_DEVFILE_ID); - - assertEquals(unwrapDto(response, ServiceError.class).getMessage(), errMessage); - } - - @Test - public void shouldThrowNotFoundExceptionWhenUpdatingNonExistingUserDevfile() throws Exception { - // given - final UserDevfile userDevfile = - DtoConverter.asDto(TestObjectGenerator.createUserDevfile("devfile-name")); - - doThrow(new NotFoundException(format("User devfile with id %s is not found.", USER_DEVFILE_ID))) - .when(userDevfileManager) - .updateUserDevfile(any(UserDevfile.class)); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType(APPLICATION_JSON) - .body(DtoFactory.getInstance().toJson(userDevfile)) - .when() - .put(SECURE_PATH + "/devfile/" + USER_DEVFILE_ID); - // then - assertEquals(response.getStatusCode(), 404); - assertEquals( - unwrapDto(response, ServiceError.class).getMessage(), - format("User devfile with id %s is not found.", USER_DEVFILE_ID)); - } - - @Test - public void shouldBeAbleToUpdateUserDevfile() throws Exception { - // given - final UserDevfileDto devfileDto = TestObjectGenerator.createUserDevfileDto(); - final UserDevfileImpl userDevfileImpl = new UserDevfileImpl(devfileDto, TEST_ACCOUNT); - when(userDevfileManager.updateUserDevfile(any(UserDevfile.class))).thenReturn(userDevfileImpl); - - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType(APPLICATION_JSON) - .body(DtoFactory.getInstance().toJson(devfileDto)) - .when() - .put(SECURE_PATH + "/devfile/" + devfileDto.getId()); - // then - assertEquals(response.getStatusCode(), 200); - assertEquals( - new UserDevfileImpl(unwrapDto(response, UserDevfileDto.class), TEST_ACCOUNT), - userDevfileImpl); - verify(userDevfileManager).updateUserDevfile(devfileDto); - verify(linksInjector).injectLinks(any(), any()); - } - - @Test(dataProvider = "invalidUserDevfiles") - public void shouldFailToUpdateWithInvalidUserDevfile( - UserDevfileDto userDevfileDto, String expectedErrorMessage) throws Exception { - // given - userDevfileDto = userDevfileDto.withId("id-123"); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType(APPLICATION_JSON) - .body(DtoFactory.getInstance().toJson(userDevfileDto)) - .when() - .put(SECURE_PATH + "/devfile/" + userDevfileDto.getId()); - // then - assertEquals(response.getStatusCode(), 400); - ServiceError error = unwrapDto(response, ServiceError.class); - assertNotNull(error); - assertEquals(error.getMessage(), expectedErrorMessage); - verifyNoMoreInteractions(userDevfileManager); - verifyNoMoreInteractions(linksInjector); - } - - @Test - public void shouldOverrideIdOnUpdateUserDevfile() throws Exception { - // given - final UserDevfileDto devfileDto = TestObjectGenerator.createUserDevfileDto(); - final UserDevfileImpl userDevfileImpl = new UserDevfileImpl(devfileDto, TEST_ACCOUNT); - - final String newID = NameGenerator.generate("id", 24); - final UserDevfileImpl expectedUserDevfileImpl = - new UserDevfileImpl(newID, TEST_ACCOUNT, userDevfileImpl); - final UserDevfileDto expectedDto = - org.eclipse.che.api.devfile.server.DtoConverter.asDto(expectedUserDevfileImpl); - when(userDevfileManager.updateUserDevfile(any(UserDevfile.class))) - .thenReturn(expectedUserDevfileImpl); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType(APPLICATION_JSON) - .body(DtoFactory.getInstance().toJson(devfileDto)) - .when() - .put(SECURE_PATH + "/devfile/" + newID); - // then - assertEquals(response.getStatusCode(), 200); - assertEquals( - new UserDevfileImpl(unwrapDto(response, UserDevfileDto.class), TEST_ACCOUNT), - expectedUserDevfileImpl); - verify(userDevfileManager).updateUserDevfile(expectedDto); - verify(linksInjector).injectLinks(any(), any()); - } - - @Test - public void shouldRemoveUserDevfileByGivenIdentifier() throws Exception { - // given - // when - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .expect() - .statusCode(204) - .when() - .delete(SECURE_PATH + "/devfile/" + USER_DEVFILE_ID); - // then - verify(userDevfileManager).removeUserDevfile(USER_DEVFILE_ID); - } - - @Test - public void shouldNotThrowAnyExceptionWhenRemovingNonExistingUserDevfile() throws Exception { - // given - Mockito.doNothing().when(userDevfileManager).removeUserDevfile(anyString()); - // when - Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .delete(SECURE_PATH + "/devfile/" + USER_DEVFILE_ID); - // then - assertEquals(response.getStatusCode(), 204); - } - - @Test - public void shouldGetUserDevfilesAvailableToUser() throws Exception { - // given - final UserDevfileDto devfileDto = TestObjectGenerator.createUserDevfileDto(); - final UserDevfileImpl userDevfileImpl = new UserDevfileImpl(devfileDto, TEST_ACCOUNT); - doReturn(new Page<>(ImmutableList.of(userDevfileImpl), 0, 1, 1)) - .when(userDevfileManager) - .getUserDevfiles(anyInt(), anyInt(), anyList(), anyList()); - - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .when() - .get(SECURE_PATH + "/devfile/search") - .then() - .extract() - .response(); - - // then - assertEquals(response.getStatusCode(), 200); - final List res = unwrapDtoList(response, UserDevfileDto.class); - assertEquals(res.size(), 1); - assertEquals(res.get(0).withLinks(emptyList()), devfileDto); - verify(userDevfileManager).getUserDevfiles(eq(30), eq(0), anyList(), anyList()); - } - - @Test - public void shouldBeAbleToSetLimitAndOffsetOnUserDevfileSearch() throws Exception { - // given - doReturn(new Page<>(Collections.emptyList(), 0, 1, 0)) - .when(userDevfileManager) - .getUserDevfiles(anyInt(), anyInt(), anyList(), anyList()); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .queryParam("maxItems", 5) - .queryParam("skipCount", 52) - .when() - .get(SECURE_PATH + "/devfile/search") - .then() - .extract() - .response(); - // then - // then - assertEquals(response.getStatusCode(), 200); - verify(userDevfileManager).getUserDevfiles(eq(5), eq(52), anyList(), anyList()); - } - - @Test - public void shouldBeAbleToSetFiltertOnUserDevfileSearch() throws Exception { - // given - doReturn(new Page<>(Collections.emptyList(), 0, 1, 0)) - .when(userDevfileManager) - .getUserDevfiles(anyInt(), anyInt(), anyList(), anyList()); - Map parameters = - ImmutableMap.of("id", "sdfsdf5", "devfile.meta.name", "like:%dfdf"); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .queryParam("id", "sdfsdf5") - .queryParam("devfile.meta.name", "like:%dfdf") - .when() - .get(SECURE_PATH + "/devfile/search") - .then() - .extract() - .response(); - - // then - assertEquals(response.getStatusCode(), 200); - Class>> listClass = - (Class>>) (Class) ArrayList.class; - ArgumentCaptor>> filterCaptor = ArgumentCaptor.forClass(listClass); - verify(userDevfileManager).getUserDevfiles(eq(30), eq(0), filterCaptor.capture(), anyList()); - assertEquals( - filterCaptor.getValue(), - ImmutableList.of(new Pair("devfile.meta.name", "like:%dfdf"), new Pair("id", "sdfsdf5"))); - } - - @Test - public void shouldBeAbleToSetOrderOnUserDevfileSearch() throws Exception { - // given - doReturn(new Page<>(Collections.emptyList(), 0, 1, 0)) - .when(userDevfileManager) - .getUserDevfiles(anyInt(), anyInt(), anyList(), anyList()); - // when - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .contentType("application/json") - .queryParam("order", "id:asc,name:desc") - .when() - .get(SECURE_PATH + "/devfile/search") - .then() - .extract() - .response(); - // then - assertEquals(response.getStatusCode(), 200); - Class>> listClass = - (Class>>) (Class) ArrayList.class; - ArgumentCaptor>> orderCaptor = ArgumentCaptor.forClass(listClass); - verify(userDevfileManager).getUserDevfiles(eq(30), eq(0), anyList(), orderCaptor.capture()); - assertEquals( - orderCaptor.getValue(), ImmutableList.of(new Pair("id", "asc"), new Pair("name", "desc"))); - } - @DataProvider public Object[][] validUserDevfiles() { return new Object[][] { diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.0/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.0/devfile.json index 146238f89f..4c6f354110 100644 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.0/devfile.json +++ b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.0/devfile.json @@ -1,7 +1,7 @@ { - "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.", + "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.\n\nIDE-targeted variants of the schemas provide the following difference compared to the main schemas:\n- They contain additional non-standard `markdownDescription` attributes that are used by IDEs such a VSCode\nto provide markdown-rendered documentation hovers. \n- They don't contain `default` attributes, since this triggers unwanted addition of defaulted fields during completion in IDEs.", "type": "object", - "title": "Devfile schema - Version 2.2.0-alpha", + "title": "Devfile schema - Version 2.2.0 - IDE-targeted variant", "required": [ "schemaVersion" ], @@ -9,7 +9,8 @@ "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "commands": { "description": "Predefined, ready-to-use, devworkspace-related commands", @@ -46,7 +47,8 @@ "properties": { "component": { "description": "Describes component that will be applied", - "type": "string" + "type": "string", + "markdownDescription": "Describes component that will be applied" }, "group": { "description": "Defines the group this command is part of", @@ -57,7 +59,8 @@ "properties": { "isDefault": { "description": "Identifies the default command for a given group kind", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Identifies the default command for a given group kind" }, "kind": { "description": "Kind of group the command is part of", @@ -68,22 +71,27 @@ "test", "debug", "deploy" - ] + ], + "markdownDescription": "Kind of group the command is part of" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines the group this command is part of" }, "label": { "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" + "type": "string", + "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false." }, "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "composite": { "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", @@ -94,7 +102,8 @@ "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The commands that comprise this composite command" }, "group": { "description": "Defines the group this command is part of", @@ -105,7 +114,8 @@ "properties": { "isDefault": { "description": "Identifies the default command for a given group kind", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Identifies the default command for a given group kind" }, "kind": { "description": "Kind of group the command is part of", @@ -116,21 +126,26 @@ "test", "debug", "deploy" - ] + ], + "markdownDescription": "Kind of group the command is part of" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines the group this command is part of" }, "label": { "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" + "type": "string", + "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" }, "parallel": { "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Indicates if the sub-commands should be executed concurrently" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Composite command that allows executing several sub-commands either sequentially or concurrently" }, "exec": { "description": "CLI Command executed in an existing component container", @@ -142,11 +157,13 @@ "properties": { "commandLine": { "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" + "type": "string", + "markdownDescription": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." }, "component": { "description": "Describes component to which given action relates", - "type": "string" + "type": "string", + "markdownDescription": "Describes component to which given action relates" }, "env": { "description": "Optional list of environment variables that have to be set before running the command", @@ -166,7 +183,8 @@ } }, "additionalProperties": false - } + }, + "markdownDescription": "Optional list of environment variables that have to be set before running the command" }, "group": { "description": "Defines the group this command is part of", @@ -177,7 +195,8 @@ "properties": { "isDefault": { "description": "Identifies the default command for a given group kind", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Identifies the default command for a given group kind" }, "kind": { "description": "Kind of group the command is part of", @@ -188,35 +207,43 @@ "test", "debug", "deploy" - ] + ], + "markdownDescription": "Kind of group the command is part of" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines the group this command is part of" }, "hotReloadCapable": { "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`" }, "label": { "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" + "type": "string", + "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" }, "workingDir": { "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" + "type": "string", + "markdownDescription": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "CLI Command executed in an existing component container" }, "id": { "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events." } }, "additionalProperties": false - } + }, + "markdownDescription": "Predefined, ready-to-use, devworkspace-related commands" }, "components": { "description": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components", @@ -257,7 +284,8 @@ "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "container": { "description": "Allows adding and configuring devworkspace-related containers", @@ -275,31 +303,36 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to deployment" }, "service": { "description": "Annotations to be added to service", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to service" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Annotations that should be added to specific resources for this container" }, "args": { "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image." }, "command": { "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image." }, "cpuLimit": { "type": "string" @@ -309,7 +342,8 @@ }, "dedicatedPod": { "description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`" }, "endpoints": { "type": "array", @@ -325,22 +359,24 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" }, "attributes": { "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," }, "exposure": { "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", "type": "string", - "default": "public", "enum": [ "public", "internal", "none" - ] + ], + "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" }, "name": { "type": "string", @@ -349,12 +385,12 @@ }, "path": { "description": "Path of the endpoint URL", - "type": "string" + "type": "string", + "markdownDescription": "Path of the endpoint URL" }, "protocol": { "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`", "type": "string", - "default": "http", "enum": [ "http", "https", @@ -362,15 +398,18 @@ "wss", "tcp", "udp" - ] + ], + "markdownDescription": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`" }, "secure": { "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "description": "The port number should be unique.", - "type": "integer" + "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", + "type": "integer", + "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." } }, "additionalProperties": false @@ -394,7 +433,8 @@ } }, "additionalProperties": false - } + }, + "markdownDescription": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`" }, "image": { "type": "string" @@ -407,12 +447,13 @@ }, "mountSources": { "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true." }, "sourceMapping": { "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", "type": "string", - "default": "/projects" + "markdownDescription": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used." }, "volumeMounts": { "description": "List of volumes mounts that should be mounted is this container.", @@ -428,18 +469,23 @@ "description": "The volume mount name is the name of an existing `Volume` component. If several containers mount the same volume name then they will reuse the same volume and will be able to access to the same files.", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "The volume mount name is the name of an existing `Volume` component. If several containers mount the same volume name then they will reuse the same volume and will be able to access to the same files." }, "path": { "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" + "type": "string", + "markdownDescription": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`." } }, - "additionalProperties": false - } + "additionalProperties": false, + "markdownDescription": "Volume that should be mounted to a component container" + }, + "markdownDescription": "List of volumes mounts that should be mounted is this container." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, "image": { "description": "Allows specifying the definition of an image for outer loop builds", @@ -457,7 +503,8 @@ "properties": { "autoBuild": { "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Defines if the image should be built during startup.\n\nDefault value is `false`" }, "dockerfile": { "description": "Allows specifying dockerfile type build", @@ -485,11 +532,13 @@ "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The arguments to supply to the dockerfile build." }, "buildContext": { "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string" + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container" }, "devfileRegistry": { "description": "Dockerfile's Devfile Registry source", @@ -500,14 +549,17 @@ "properties": { "id": { "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string" + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." }, "registryUrl": { "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string" + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" }, "git": { "description": "Dockerfile's Git source", @@ -522,46 +574,57 @@ "properties": { "remote": { "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" }, "revision": { "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "fileLocation": { "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string" + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." }, "remotes": { "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" }, "rootRequired": { "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" }, "uri": { "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string" + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" }, "imageName": { "description": "Name of the image for the resulting outerloop build", - "type": "string" + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", @@ -581,7 +644,8 @@ "properties": { "deployByDefault": { "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" }, "endpoints": { "type": "array", @@ -597,22 +661,24 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" }, "attributes": { "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," }, "exposure": { "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", "type": "string", - "default": "public", "enum": [ "public", "internal", "none" - ] + ], + "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" }, "name": { "type": "string", @@ -621,12 +687,12 @@ }, "path": { "description": "Path of the endpoint URL", - "type": "string" + "type": "string", + "markdownDescription": "Path of the endpoint URL" }, "protocol": { "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`", "type": "string", - "default": "http", "enum": [ "http", "https", @@ -634,15 +700,18 @@ "wss", "tcp", "udp" - ] + ], + "markdownDescription": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`" }, "secure": { "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "description": "The port number should be unique.", - "type": "integer" + "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", + "type": "integer", + "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." } }, "additionalProperties": false @@ -650,20 +719,24 @@ }, "inlined": { "description": "Inlined manifest", - "type": "string" + "type": "string", + "markdownDescription": "Inlined manifest" }, "uri": { "description": "Location in a file fetched from a uri.", - "type": "string" + "type": "string", + "markdownDescription": "Location in a file fetched from a uri." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production." }, "name": { "description": "Mandatory name that allows referencing the component from other elements (such as commands) or from an external devfile that may reference this component through a parent or a plugin.", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Mandatory name that allows referencing the component from other elements (such as commands) or from an external devfile that may reference this component through a parent or a plugin." }, "openshift": { "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", @@ -683,7 +756,8 @@ "properties": { "deployByDefault": { "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" }, "endpoints": { "type": "array", @@ -699,22 +773,24 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" }, "attributes": { "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," }, "exposure": { "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", "type": "string", - "default": "public", "enum": [ "public", "internal", "none" - ] + ], + "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" }, "name": { "type": "string", @@ -723,12 +799,12 @@ }, "path": { "description": "Path of the endpoint URL", - "type": "string" + "type": "string", + "markdownDescription": "Path of the endpoint URL" }, "protocol": { "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`", "type": "string", - "default": "http", "enum": [ "http", "https", @@ -736,15 +812,18 @@ "wss", "tcp", "udp" - ] + ], + "markdownDescription": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`" }, "secure": { "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "description": "The port number should be unique.", - "type": "integer" + "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", + "type": "integer", + "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." } }, "additionalProperties": false @@ -752,14 +831,17 @@ }, "inlined": { "description": "Inlined manifest", - "type": "string" + "type": "string", + "markdownDescription": "Inlined manifest" }, "uri": { "description": "Location in a file fetched from a uri.", - "type": "string" + "type": "string", + "markdownDescription": "Location in a file fetched from a uri." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production." }, "volume": { "description": "Allows specifying the definition of a volume shared by several other components", @@ -767,18 +849,22 @@ "properties": { "ephemeral": { "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Ephemeral volumes are not stored persistently across restarts. Defaults to false" }, "size": { "description": "Size of the volume", - "type": "string" + "type": "string", + "markdownDescription": "Size of the volume" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of a volume shared by several other components" } }, "additionalProperties": false - } + }, + "markdownDescription": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components" }, "events": { "description": "Bindings of commands to events. Each command is referred-to by its name.", @@ -789,31 +875,36 @@ "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "IDs of commands that should be executed after the devworkspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser." }, "postStop": { "description": "IDs of commands that should be executed after stopping the devworkspace.", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "IDs of commands that should be executed after stopping the devworkspace." }, "preStart": { "description": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD.", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD." }, "preStop": { "description": "IDs of commands that should be executed before stopping the devworkspace.", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "IDs of commands that should be executed before stopping the devworkspace." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Bindings of commands to events. Each command is referred-to by its name." }, "metadata": { "description": "Optional metadata", @@ -831,68 +922,84 @@ "arm64", "ppc64le", "s390x" - ] - } + ], + "markdownDescription": "Architecture describes the architecture type" + }, + "markdownDescription": "Optional list of processor architectures that the devfile supports, empty list suggests that the devfile can be used on any architecture" }, "attributes": { "description": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead." }, "description": { "description": "Optional devfile description", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile description" }, "displayName": { "description": "Optional devfile display name", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile display name" }, "globalMemoryLimit": { "description": "Optional devfile global memory limit", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile global memory limit" }, "icon": { "description": "Optional devfile icon, can be a URI or a relative path in the project", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile icon, can be a URI or a relative path in the project" }, "language": { "description": "Optional devfile language", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile language" }, "name": { "description": "Optional devfile name", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile name" }, "projectType": { "description": "Optional devfile project type", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile project type" }, "provider": { "description": "Optional devfile provider information", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile provider information" }, "supportUrl": { "description": "Optional link to a page that provides support information", - "type": "string" + "type": "string", + "markdownDescription": "Optional link to a page that provides support information" }, "tags": { "description": "Optional devfile tags", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "Optional devfile tags" }, "version": { "description": "Optional semver-compatible version", "type": "string", - "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" + "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", + "markdownDescription": "Optional semver-compatible version" }, "website": { "description": "Optional devfile website", - "type": "string" + "type": "string", + "markdownDescription": "Optional devfile website" } }, - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Optional metadata" }, "parent": { "description": "Parent devworkspace template", @@ -918,7 +1025,8 @@ "attributes": { "description": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." }, "commands": { "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", @@ -952,7 +1060,8 @@ "properties": { "component": { "description": "Describes component that will be applied", - "type": "string" + "type": "string", + "markdownDescription": "Describes component that will be applied" }, "group": { "description": "Defines the group this command is part of", @@ -960,7 +1069,8 @@ "properties": { "isDefault": { "description": "Identifies the default command for a given group kind", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Identifies the default command for a given group kind" }, "kind": { "description": "Kind of group the command is part of", @@ -971,22 +1081,27 @@ "test", "debug", "deploy" - ] + ], + "markdownDescription": "Kind of group the command is part of" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines the group this command is part of" }, "label": { "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" + "type": "string", + "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false." }, "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "composite": { "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", @@ -997,7 +1112,8 @@ "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The commands that comprise this composite command" }, "group": { "description": "Defines the group this command is part of", @@ -1005,7 +1121,8 @@ "properties": { "isDefault": { "description": "Identifies the default command for a given group kind", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Identifies the default command for a given group kind" }, "kind": { "description": "Kind of group the command is part of", @@ -1016,21 +1133,26 @@ "test", "debug", "deploy" - ] + ], + "markdownDescription": "Kind of group the command is part of" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines the group this command is part of" }, "label": { "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" + "type": "string", + "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" }, "parallel": { "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Indicates if the sub-commands should be executed concurrently" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Composite command that allows executing several sub-commands either sequentially or concurrently" }, "exec": { "description": "CLI Command executed in an existing component container", @@ -1038,11 +1160,13 @@ "properties": { "commandLine": { "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" + "type": "string", + "markdownDescription": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." }, "component": { "description": "Describes component to which given action relates", - "type": "string" + "type": "string", + "markdownDescription": "Describes component to which given action relates" }, "env": { "description": "Optional list of environment variables that have to be set before running the command", @@ -1061,7 +1185,8 @@ } }, "additionalProperties": false - } + }, + "markdownDescription": "Optional list of environment variables that have to be set before running the command" }, "group": { "description": "Defines the group this command is part of", @@ -1069,7 +1194,8 @@ "properties": { "isDefault": { "description": "Identifies the default command for a given group kind", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Identifies the default command for a given group kind" }, "kind": { "description": "Kind of group the command is part of", @@ -1080,35 +1206,43 @@ "test", "debug", "deploy" - ] + ], + "markdownDescription": "Kind of group the command is part of" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines the group this command is part of" }, "hotReloadCapable": { "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`" }, "label": { "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" + "type": "string", + "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" }, "workingDir": { "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" + "type": "string", + "markdownDescription": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "CLI Command executed in an existing component container" }, "id": { "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events." } }, "additionalProperties": false - } + }, + "markdownDescription": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules." }, "components": { "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", @@ -1149,7 +1283,8 @@ "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "container": { "description": "Allows adding and configuring devworkspace-related containers", @@ -1164,31 +1299,36 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to deployment" }, "service": { "description": "Annotations to be added to service", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to service" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Annotations that should be added to specific resources for this container" }, "args": { "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image." }, "command": { "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image." }, "cpuLimit": { "type": "string" @@ -1198,7 +1338,8 @@ }, "dedicatedPod": { "description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`" }, "endpoints": { "type": "array", @@ -1213,12 +1354,14 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" }, "attributes": { "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," }, "exposure": { "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", @@ -1227,7 +1370,8 @@ "public", "internal", "none" - ] + ], + "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" }, "name": { "type": "string", @@ -1236,7 +1380,8 @@ }, "path": { "description": "Path of the endpoint URL", - "type": "string" + "type": "string", + "markdownDescription": "Path of the endpoint URL" }, "protocol": { "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`", @@ -1248,15 +1393,18 @@ "wss", "tcp", "udp" - ] + ], + "markdownDescription": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`" }, "secure": { "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "description": "The port number should be unique.", - "type": "integer" + "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", + "type": "integer", + "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." } }, "additionalProperties": false @@ -1279,7 +1427,8 @@ } }, "additionalProperties": false - } + }, + "markdownDescription": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`" }, "image": { "type": "string" @@ -1292,11 +1441,13 @@ }, "mountSources": { "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true." }, "sourceMapping": { "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string" + "type": "string", + "markdownDescription": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used." }, "volumeMounts": { "description": "List of volumes mounts that should be mounted is this container.", @@ -1312,18 +1463,23 @@ "description": "The volume mount name is the name of an existing `Volume` component. If several containers mount the same volume name then they will reuse the same volume and will be able to access to the same files.", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "The volume mount name is the name of an existing `Volume` component. If several containers mount the same volume name then they will reuse the same volume and will be able to access to the same files." }, "path": { "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" + "type": "string", + "markdownDescription": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`." } }, - "additionalProperties": false - } + "additionalProperties": false, + "markdownDescription": "Volume that should be mounted to a component container" + }, + "markdownDescription": "List of volumes mounts that should be mounted is this container." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, "image": { "description": "Allows specifying the definition of an image for outer loop builds", @@ -1343,7 +1499,8 @@ "properties": { "autoBuild": { "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Defines if the image should be built during startup.\n\nDefault value is `false`" }, "dockerfile": { "description": "Allows specifying dockerfile type build", @@ -1371,11 +1528,13 @@ "type": "array", "items": { "type": "string" - } + }, + "markdownDescription": "The arguments to supply to the dockerfile build." }, "buildContext": { "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string" + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container" }, "devfileRegistry": { "description": "Dockerfile's Devfile Registry source", @@ -1383,14 +1542,17 @@ "properties": { "id": { "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string" + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." }, "registryUrl": { "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string" + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" }, "git": { "description": "Dockerfile's Git source", @@ -1402,46 +1564,57 @@ "properties": { "remote": { "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" }, "revision": { "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "fileLocation": { "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string" + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." }, "remotes": { "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" }, "rootRequired": { "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" }, "uri": { "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string" + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" }, "imageName": { "description": "Name of the image for the resulting outerloop build", - "type": "string" + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", @@ -1461,7 +1634,8 @@ "properties": { "deployByDefault": { "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" }, "endpoints": { "type": "array", @@ -1476,12 +1650,14 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" }, "attributes": { "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," }, "exposure": { "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", @@ -1490,7 +1666,8 @@ "public", "internal", "none" - ] + ], + "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" }, "name": { "type": "string", @@ -1499,7 +1676,8 @@ }, "path": { "description": "Path of the endpoint URL", - "type": "string" + "type": "string", + "markdownDescription": "Path of the endpoint URL" }, "protocol": { "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`", @@ -1511,15 +1689,18 @@ "wss", "tcp", "udp" - ] + ], + "markdownDescription": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`" }, "secure": { "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "description": "The port number should be unique.", - "type": "integer" + "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", + "type": "integer", + "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." } }, "additionalProperties": false @@ -1527,20 +1708,24 @@ }, "inlined": { "description": "Inlined manifest", - "type": "string" + "type": "string", + "markdownDescription": "Inlined manifest" }, "uri": { "description": "Location in a file fetched from a uri.", - "type": "string" + "type": "string", + "markdownDescription": "Location in a file fetched from a uri." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production." }, "name": { "description": "Mandatory name that allows referencing the component from other elements (such as commands) or from an external devfile that may reference this component through a parent or a plugin.", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Mandatory name that allows referencing the component from other elements (such as commands) or from an external devfile that may reference this component through a parent or a plugin." }, "openshift": { "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", @@ -1560,7 +1745,8 @@ "properties": { "deployByDefault": { "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" }, "endpoints": { "type": "array", @@ -1575,12 +1761,14 @@ "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" }, "attributes": { "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," }, "exposure": { "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", @@ -1589,7 +1777,8 @@ "public", "internal", "none" - ] + ], + "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" }, "name": { "type": "string", @@ -1598,7 +1787,8 @@ }, "path": { "description": "Path of the endpoint URL", - "type": "string" + "type": "string", + "markdownDescription": "Path of the endpoint URL" }, "protocol": { "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`", @@ -1610,15 +1800,18 @@ "wss", "tcp", "udp" - ] + ], + "markdownDescription": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`" }, "secure": { "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "description": "The port number should be unique.", - "type": "integer" + "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", + "type": "integer", + "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." } }, "additionalProperties": false @@ -1626,14 +1819,17 @@ }, "inlined": { "description": "Inlined manifest", - "type": "string" + "type": "string", + "markdownDescription": "Inlined manifest" }, "uri": { "description": "Location in a file fetched from a uri.", - "type": "string" + "type": "string", + "markdownDescription": "Location in a file fetched from a uri." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production." }, "volume": { "description": "Allows specifying the definition of a volume shared by several other components", @@ -1641,22 +1837,27 @@ "properties": { "ephemeral": { "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" + "type": "boolean", + "markdownDescription": "Ephemeral volumes are not stored persistently across restarts. Defaults to false" }, "size": { "description": "Size of the volume", - "type": "string" + "type": "string", + "markdownDescription": "Size of the volume" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of a volume shared by several other components" } }, "additionalProperties": false - } + }, + "markdownDescription": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules." }, "id": { "description": "Id in a registry that contains a Devfile yaml file", - "type": "string" + "type": "string", + "markdownDescription": "Id in a registry that contains a Devfile yaml file" }, "kubernetes": { "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", @@ -1672,7 +1873,8 @@ "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate" }, "projects": { "description": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", @@ -1698,11 +1900,13 @@ "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "clonePath": { "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." }, "git": { "description": "Project's Git source", @@ -1714,30 +1918,36 @@ "properties": { "remote": { "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" }, "revision": { "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Git source" }, "name": { "description": "Project name", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Project name" }, "zip": { "description": "Project's Zip source", @@ -1745,18 +1955,22 @@ "properties": { "location": { "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" + "type": "string", + "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Zip source" } }, "additionalProperties": false - } + }, + "markdownDescription": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." }, "registryUrl": { "description": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `registryUrl` when `id` is used.", - "type": "string" + "type": "string", + "markdownDescription": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `registryUrl` when `id` is used." }, "starterProjects": { "description": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", @@ -1782,11 +1996,13 @@ "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "description": { "description": "Description of a starter project", - "type": "string" + "type": "string", + "markdownDescription": "Description of a starter project" }, "git": { "description": "Project's Git source", @@ -1798,34 +2014,41 @@ "properties": { "remote": { "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" }, "revision": { "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Git source" }, "name": { "description": "Project name", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Project name" }, "subDir": { "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" + "type": "string", + "markdownDescription": "Sub-directory from a starter project to be used as root for starter project." }, "zip": { "description": "Project's Zip source", @@ -1833,33 +2056,40 @@ "properties": { "location": { "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" + "type": "string", + "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Zip source" } }, "additionalProperties": false - } + }, + "markdownDescription": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." }, "uri": { "description": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI.", - "type": "string" + "type": "string", + "markdownDescription": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI." }, "variables": { "description": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." }, "version": { "description": "Specific stack/sample version to pull the parent devfile from, when using id in the parent reference. To specify `version`, `id` must be defined and used as the import reference source. `version` can be either a specific stack version, or `latest`. If no `version` specified, default version will be used.", "type": "string", - "pattern": "^(latest)|(([1-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?)$" + "pattern": "^(latest)|(([1-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?)$", + "markdownDescription": "Specific stack/sample version to pull the parent devfile from, when using id in the parent reference. To specify `version`, `id` must be defined and used as the import reference source. `version` can be either a specific stack version, or `latest`. If no `version` specified, default version will be used." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Parent devworkspace template" }, "projects": { "description": "Projects worked on in the devworkspace, containing names and sources locations", @@ -1885,11 +2115,13 @@ "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "clonePath": { "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." }, "git": { "description": "Project's Git source", @@ -1904,30 +2136,36 @@ "properties": { "remote": { "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" }, "revision": { "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Git source" }, "name": { "description": "Project name", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Project name" }, "zip": { "description": "Project's Zip source", @@ -1935,19 +2173,23 @@ "properties": { "location": { "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" + "type": "string", + "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Zip source" } }, "additionalProperties": false - } + }, + "markdownDescription": "Projects worked on in the devworkspace, containing names and sources locations" }, "schemaVersion": { "description": "Devfile schema version", "type": "string", - "pattern": "^([2-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" + "pattern": "^([2-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", + "markdownDescription": "Devfile schema version" }, "starterProjects": { "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", @@ -1973,11 +2215,13 @@ "attributes": { "description": "Map of implementation-dependant free-form YAML attributes.", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, "description": { "description": "Description of a starter project", - "type": "string" + "type": "string", + "markdownDescription": "Description of a starter project" }, "git": { "description": "Project's Git source", @@ -1992,34 +2236,41 @@ "properties": { "remote": { "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" }, "revision": { "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Git source" }, "name": { "description": "Project name", "type": "string", "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "markdownDescription": "Project name" }, "subDir": { "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" + "type": "string", + "markdownDescription": "Sub-directory from a starter project to be used as root for starter project." }, "zip": { "description": "Project's Zip source", @@ -2027,22 +2278,27 @@ "properties": { "location": { "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" + "type": "string", + "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Project's Zip source" } }, "additionalProperties": false - } + }, + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" }, "variables": { "description": "Map of key-value variables used for string replacement in the devfile. Values can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source\n\n - element identifiers, e.g. command id, component name, endpoint name, project name\n\n - references to identifiers, e.g. in events, a command's component, container's volume mount name\n\n - string enums, e.g. command group kind, endpoint exposure", "type": "object", "additionalProperties": { "type": "string" - } + }, + "markdownDescription": "Map of key-value variables used for string replacement in the devfile. Values can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source\n\n - element identifiers, e.g. command id, component name, endpoint name, project name\n\n - references to identifiers, e.g. in events, a command's component, container's volume mount name\n\n - string enums, e.g. command group kind, endpoint exposure" } }, - "additionalProperties": false + "additionalProperties": false, + "markdownDescription": "Devfile describes the structure of a cloud-native devworkspace and development environment.\n\nIDE-targeted variants of the schemas provide the following difference compared to the main schemas:\n- They contain additional non-standard `markdownDescription` attributes that are used by IDEs such a VSCode\nto provide markdown-rendered documentation hovers. \n- They don't contain `default` attributes, since this triggers unwanted addition of defaulted fields during completion in IDEs." }