Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move required field of metadata to specific schemas #6

Merged
merged 4 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/generate-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Configure Git
run: |
git config user.name "dapla-bot[bot]"
git config user.email "${{ secrets.DAPLA_BOT_APP_ID }}+dapla-bot[bot]@users.noreply.github.com"
git config user.email "143391972+dapla-bot[bot]@users.noreply.github.com"

- name: Generate Java
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Configure Git user
run: |
git config user.name "dapla-bot[bot]"
git config user.email "${{ secrets.DAPLA_BOT_APP_ID }}+dapla-bot[bot]@users.noreply.github.com"
git config user.email "143391972+dapla-bot[bot]@users.noreply.github.com"

- name: Setup Maven authentication to GitHub packages
uses: s4u/[email protected]
Expand Down
1 change: 1 addition & 0 deletions generated/java/dapla-kuben-resource-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<version>${maven-release-plugin.version}</version>
<configuration>
<tagNameFormat>java-v@{project.version}</tagNameFormat>
<localCheckout>true</localCheckout>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;


Expand All @@ -36,23 +35,19 @@ public class TeamInfoMetadataSchema implements Serializable

/**
* The (uniform) name of this team
* (Required)
*
*/
@JsonProperty("team_name")
@JsonPropertyDescription("The (uniform) name of this team")
@Size(min = 1)
@NotNull
private String teamName;
/**
* Name of this resource
* (Required)
*
*/
@JsonProperty("name")
@JsonPropertyDescription("Name of this resource")
@Size(min = 1)
@NotNull
private String name;
/**
* Whenever the metadata in this manifest is considered to be exposed in e.g. a portal. Will default to public if not specified
Expand Down Expand Up @@ -95,7 +90,6 @@ public static TeamInfoMetadataSchema.TeamInfoMetadataSchemaBuilderBase builder()

/**
* The (uniform) name of this team
* (Required)
*
*/
@JsonProperty("team_name")
Expand All @@ -105,7 +99,6 @@ public String getTeamName() {

/**
* The (uniform) name of this team
* (Required)
*
*/
@JsonProperty("team_name")
Expand All @@ -115,7 +108,6 @@ public void setTeamName(String teamName) {

/**
* Name of this resource
* (Required)
*
*/
@JsonProperty("name")
Expand All @@ -125,7 +117,6 @@ public String getName() {

/**
* Name of this resource
* (Required)
*
*/
@JsonProperty("name")
Expand Down
4 changes: 0 additions & 4 deletions src/partials/v1/team-info-metadata.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"other_metadata_field": "foo"
}
],
"required": [
"team_name",
"name"
],
"type": "object",
"properties": {
"team_name": {
Expand Down
6 changes: 5 additions & 1 deletion src/v1/additional-team-info.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
]
},
"metadata": {
"$ref": "../partials/v1/team-info-metadata.schema.json"
"$ref": "../partials/v1/team-info-metadata.schema.json",
"required": [
"name",
"team_name"
]
},
"spec": {
"description": "Custom fields/metadata for the team. All keys must be lowercase (a-z), may contain _",
Expand Down
5 changes: 4 additions & 1 deletion src/v1/platform-managed-team-info.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
]
},
"metadata": {
"$ref": "../partials/v1/team-info-metadata.schema.json"
"$ref": "../partials/v1/team-info-metadata.schema.json",
"required": [
"team_name"
]
},
"spec": {
"description": "The specification of the concrete metadata for the team. All keys must be lowercase (a-z), may contain _",
Expand Down
5 changes: 4 additions & 1 deletion src/v1/team-info.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
]
},
"metadata": {
"$ref": "../partials/v1/team-info-metadata.schema.json"
"$ref": "../partials/v1/team-info-metadata.schema.json",
"required": [
"team_name"
]
},
"spec": {
"description": "The specification of the concrete metadata for the team. All keys must be lowercase (a-z), may contain _",
Expand Down
Loading