You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BoundProjectCreateRestRequest.java 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2024 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonar.server.v2.api.projects.request;
  21. import io.swagger.v3.oas.annotations.media.Schema;
  22. import javax.annotation.Nullable;
  23. import javax.validation.constraints.NotEmpty;
  24. import javax.validation.constraints.NotNull;
  25. public record BoundProjectCreateRestRequest(
  26. @NotEmpty
  27. @Schema(description = "Key of the project to create")
  28. String projectKey,
  29. @NotEmpty
  30. @Schema(description = "Name of the project to create")
  31. String projectName,
  32. @NotEmpty
  33. @Schema(description = "Identifier of DevOps platform configuration to use.")
  34. String devOpsPlatformSettingId,
  35. @NotEmpty
  36. @Schema(description = "Identifier of the DevOps platform repository to import. Repository slug for GitHub, repository id for GitLab.")
  37. String repositoryIdentifier,
  38. @Nullable
  39. @Schema(description = """
  40. Project New Code Definition Type
  41. New code definitions of the following types are allowed:
  42. - PREVIOUS_VERSION
  43. - NUMBER_OF_DAYS
  44. - REFERENCE_BRANCH - will default to the main branch.
  45. """)
  46. String newCodeDefinitionType,
  47. @Nullable
  48. @Schema(description = """
  49. Project New Code Definition Value
  50. For each new code definition type, a different value is expected:
  51. - no value, when the new code definition type is PREVIOUS_VERSION and REFERENCE_BRANCH
  52. - a number between 1 and 90, when the new code definition type is NUMBER_OF_DAYS
  53. """)
  54. String newCodeDefinitionValue,
  55. @NotNull
  56. @Schema(description = "True if project is part of a mono repo.")
  57. Boolean monorepo
  58. ) {
  59. }