Skip to content

Commit

Permalink
Merge pull request #15 from statisticsnorway/update-schema
Browse files Browse the repository at this point in the history
Fix wrong required for github in team definition
  • Loading branch information
johnksv authored Jan 24, 2024
2 parents f06269a + d349f96 commit 0c0fc93
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
Expand All @@ -21,8 +22,14 @@
public class Github implements Serializable
{

/**
*
* (Required)
*
*/
@JsonProperty("iac_repo")
@Valid
@NotNull
private IacRepo iacRepo;
@JsonIgnore
@Valid
Expand All @@ -45,11 +52,21 @@ public static Github.GithubBuilderBase builder() {
return new Github.GithubBuilder();
}

/**
*
* (Required)
*
*/
@JsonProperty("iac_repo")
public IacRepo getIacRepo() {
return iacRepo;
}

/**
*
* (Required)
*
*/
@JsonProperty("iac_repo")
public void setIacRepo(IacRepo iacRepo) {
this.iacRepo = iacRepo;
Expand Down
4 changes: 3 additions & 1 deletion src/v1/additional-team-info.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"version": "kuben/v1",
"kind": "AdditionalTeamInfo",
"metadata": {
"name": "my-name"
"name": "my-name",
"team_name": "dapla-platform",
"visibility": "PUBLIC"
},
"spec": {
"my-field": "123",
Expand Down
2 changes: 1 addition & 1 deletion src/v1/kuben-team-definition.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"github": {
"type": "object",
"required": [
"name"
"iac_repo"
],
"properties": {
"iac_repo": {
Expand Down

0 comments on commit 0c0fc93

Please sign in to comment.