Skip to content

Commit

Permalink
refactor: openshift-model-console generated from OpenAPI schemas
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Sep 30, 2024
1 parent 6406b88 commit 755726f
Show file tree
Hide file tree
Showing 35 changed files with 197 additions and 1,415 deletions.
6 changes: 1 addition & 5 deletions kubernetes-model-generator/openshift-model-console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,8 @@
<configuration >
<settings combine.self="append">
<schemas>
<schema>${openapi.schema.openshift-latest}</schema>
<schema>${openapi.schema.openshift-generated}</schema>
</schemas>
<packageMappings combine.self="append">
<io.k8s.api>io.fabric8.kubernetes.api.model</io.k8s.api>
<io.openshift.console>io.fabric8.openshift.api.model.console</io.openshift.console>
</packageMappings>
<includeGenerationRegexes>
<includeGenerationRegex>^io\.openshift\.console\..*$</includeGenerationRegex>
</includeGenerationRegexes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class ConsoleLinkSpecApplicationMenu implements Editable<ConsoleLinkSpecApplicationMenuBuilder> , KubernetesResource
public class ApplicationMenuSpec implements Editable<ApplicationMenuSpecBuilder> , KubernetesResource
{

@JsonProperty("imageURL")
Expand All @@ -66,10 +66,10 @@ public class ConsoleLinkSpecApplicationMenu implements Editable<ConsoleLinkSpecA
* No args constructor for use in serialization
*
*/
public ConsoleLinkSpecApplicationMenu() {
public ApplicationMenuSpec() {
}

public ConsoleLinkSpecApplicationMenu(String imageURL, String section) {
public ApplicationMenuSpec(String imageURL, String section) {
super();
this.imageURL = imageURL;
this.section = section;
Expand All @@ -96,12 +96,12 @@ public void setSection(String section) {
}

@JsonIgnore
public ConsoleLinkSpecApplicationMenuBuilder edit() {
return new ConsoleLinkSpecApplicationMenuBuilder(this);
public ApplicationMenuSpecBuilder edit() {
return new ApplicationMenuSpecBuilder(this);
}

@JsonIgnore
public ConsoleLinkSpecApplicationMenuBuilder toBuilder() {
public ApplicationMenuSpecBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class ConsoleCLIDownloadSpecLinks implements Editable<ConsoleCLIDownloadSpecLinksBuilder> , KubernetesResource
public class CLIDownloadLink implements Editable<CLIDownloadLinkBuilder> , KubernetesResource
{

@JsonProperty("href")
Expand All @@ -66,10 +66,10 @@ public class ConsoleCLIDownloadSpecLinks implements Editable<ConsoleCLIDownloadS
* No args constructor for use in serialization
*
*/
public ConsoleCLIDownloadSpecLinks() {
public CLIDownloadLink() {
}

public ConsoleCLIDownloadSpecLinks(String href, String text) {
public CLIDownloadLink(String href, String text) {
super();
this.href = href;
this.text = text;
Expand All @@ -96,12 +96,12 @@ public void setText(String text) {
}

@JsonIgnore
public ConsoleCLIDownloadSpecLinksBuilder edit() {
return new ConsoleCLIDownloadSpecLinksBuilder(this);
public CLIDownloadLinkBuilder edit() {
return new CLIDownloadLinkBuilder(this);
}

@JsonIgnore
public ConsoleCLIDownloadSpecLinksBuilder toBuilder() {
public CLIDownloadLinkBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class ConsoleCLIDownloadSpec implements Editable<ConsoleCLIDownloadSpecBu
private String displayName;
@JsonProperty("links")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<ConsoleCLIDownloadSpecLinks> links = new ArrayList<>();
private List<CLIDownloadLink> links = new ArrayList<>();
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

Expand All @@ -75,7 +75,7 @@ public class ConsoleCLIDownloadSpec implements Editable<ConsoleCLIDownloadSpecBu
public ConsoleCLIDownloadSpec() {
}

public ConsoleCLIDownloadSpec(String description, String displayName, List<ConsoleCLIDownloadSpecLinks> links) {
public ConsoleCLIDownloadSpec(String description, String displayName, List<CLIDownloadLink> links) {
super();
this.description = description;
this.displayName = displayName;
Expand Down Expand Up @@ -104,12 +104,12 @@ public void setDisplayName(String displayName) {

@JsonProperty("links")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<ConsoleCLIDownloadSpecLinks> getLinks() {
public List<CLIDownloadLink> getLinks() {
return links;
}

@JsonProperty("links")
public void setLinks(List<ConsoleCLIDownloadSpecLinks> links) {
public void setLinks(List<CLIDownloadLink> links) {
this.links = links;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public class ConsoleLinkSpec implements Editable<ConsoleLinkSpecBuilder> , Kuber
{

@JsonProperty("applicationMenu")
private ConsoleLinkSpecApplicationMenu applicationMenu;
private ApplicationMenuSpec applicationMenu;
@JsonProperty("href")
private String href;
@JsonProperty("location")
private String location;
@JsonProperty("namespaceDashboard")
private ConsoleLinkSpecNamespaceDashboard namespaceDashboard;
private NamespaceDashboardSpec namespaceDashboard;
@JsonProperty("text")
private String text;
@JsonIgnore
Expand All @@ -78,7 +78,7 @@ public class ConsoleLinkSpec implements Editable<ConsoleLinkSpecBuilder> , Kuber
public ConsoleLinkSpec() {
}

public ConsoleLinkSpec(ConsoleLinkSpecApplicationMenu applicationMenu, String href, String location, ConsoleLinkSpecNamespaceDashboard namespaceDashboard, String text) {
public ConsoleLinkSpec(ApplicationMenuSpec applicationMenu, String href, String location, NamespaceDashboardSpec namespaceDashboard, String text) {
super();
this.applicationMenu = applicationMenu;
this.href = href;
Expand All @@ -88,12 +88,12 @@ public ConsoleLinkSpec(ConsoleLinkSpecApplicationMenu applicationMenu, String hr
}

@JsonProperty("applicationMenu")
public ConsoleLinkSpecApplicationMenu getApplicationMenu() {
public ApplicationMenuSpec getApplicationMenu() {
return applicationMenu;
}

@JsonProperty("applicationMenu")
public void setApplicationMenu(ConsoleLinkSpecApplicationMenu applicationMenu) {
public void setApplicationMenu(ApplicationMenuSpec applicationMenu) {
this.applicationMenu = applicationMenu;
}

Expand All @@ -118,12 +118,12 @@ public void setLocation(String location) {
}

@JsonProperty("namespaceDashboard")
public ConsoleLinkSpecNamespaceDashboard getNamespaceDashboard() {
public NamespaceDashboardSpec getNamespaceDashboard() {
return namespaceDashboard;
}

@JsonProperty("namespaceDashboard")
public void setNamespaceDashboard(ConsoleLinkSpecNamespaceDashboard namespaceDashboard) {
public void setNamespaceDashboard(NamespaceDashboardSpec namespaceDashboard) {
this.namespaceDashboard = namespaceDashboard;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class ConsoleNotificationSpec implements Editable<ConsoleNotificationSpec
@JsonProperty("color")
private String color;
@JsonProperty("link")
private ConsoleNotificationSpecLink link;
private Link link;
@JsonProperty("location")
private String location;
@JsonProperty("text")
Expand All @@ -78,7 +78,7 @@ public class ConsoleNotificationSpec implements Editable<ConsoleNotificationSpec
public ConsoleNotificationSpec() {
}

public ConsoleNotificationSpec(String backgroundColor, String color, ConsoleNotificationSpecLink link, String location, String text) {
public ConsoleNotificationSpec(String backgroundColor, String color, Link link, String location, String text) {
super();
this.backgroundColor = backgroundColor;
this.color = color;
Expand Down Expand Up @@ -108,12 +108,12 @@ public void setColor(String color) {
}

@JsonProperty("link")
public ConsoleNotificationSpecLink getLink() {
public Link getLink() {
return link;
}

@JsonProperty("link")
public void setLink(ConsoleNotificationSpecLink link) {
public void setLink(Link link) {
this.link = link;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class ConsolePluginSpecBackend implements Editable<ConsolePluginSpecBackendBuilder> , KubernetesResource
public class ConsolePluginBackend implements Editable<ConsolePluginBackendBuilder> , KubernetesResource
{

@JsonProperty("service")
private ConsolePluginSpecBService service;
private ConsolePluginService service;
@JsonProperty("type")
private String type;
@JsonIgnore
Expand All @@ -66,22 +66,22 @@ public class ConsolePluginSpecBackend implements Editable<ConsolePluginSpecBacke
* No args constructor for use in serialization
*
*/
public ConsolePluginSpecBackend() {
public ConsolePluginBackend() {
}

public ConsolePluginSpecBackend(ConsolePluginSpecBService service, String type) {
public ConsolePluginBackend(ConsolePluginService service, String type) {
super();
this.service = service;
this.type = type;
}

@JsonProperty("service")
public ConsolePluginSpecBService getService() {
public ConsolePluginService getService() {
return service;
}

@JsonProperty("service")
public void setService(ConsolePluginSpecBService service) {
public void setService(ConsolePluginService service) {
this.service = service;
}

Expand All @@ -96,12 +96,12 @@ public void setType(String type) {
}

@JsonIgnore
public ConsolePluginSpecBackendBuilder edit() {
return new ConsolePluginSpecBackendBuilder(this);
public ConsolePluginBackendBuilder edit() {
return new ConsolePluginBackendBuilder(this);
}

@JsonIgnore
public ConsolePluginSpecBackendBuilder toBuilder() {
public ConsolePluginBackendBuilder toBuilder() {
return edit();
}

Expand Down
Loading

0 comments on commit 755726f

Please sign in to comment.