Corrected the fact that
build / build (push) Has been cancelled

`OllamaPerameter.OllamaPerameterBuilder#addProperty(String, Type, String, boolean)` did not respect whether it's required or not
Corrected so `OllamaPerameter.OllamaPerameterBuilder#removeProperty(String)` also removes it from the required list
Corrected Javadocs
made OllamaPerameter.OllamaPerameterBuilder.Type#type a final
This commit is contained in:
2026-05-27 20:20:27 +02:00
parent 06cf1c766a
commit ac159c2498
@@ -80,7 +80,7 @@ public class OllamaPerameter {
ArrayList<String> required = new ArrayList<>();
/**
* Creates a new instance of {@link OllamaPerameterBuilder}.
* Add an optinal perameter to this {@link OllamaPerameterBuilder}
* @param name The name of the parameter
* @param type The type of the parameter
* @param description The description of the parameter
@@ -95,7 +95,7 @@ public class OllamaPerameter {
}
/**
* Creates a new instance of {@link OllamaPerameterBuilder}.
* Add a potentialy required peremeter to this {@link OllamaPerameterBuilder}.
* @param name The name of the parameter
* @param type The type of the parameter
* @param description The description of the parameter
@@ -107,12 +107,14 @@ public class OllamaPerameter {
return this;
}
propertyMap.put(name, new Property(type.getType(), description));
this.required.add(name);
if(required) {
this.required.add(name);
}
return this;
}
/**
* Creates a new instance of {@link OllamaPerameterBuilder}.
* Makes a previusly optinal perameter required for this {@link OllamaPerameterBuilder}
* @param name The name of the parameter
* @return The {@link OllamaPerameterBuilder}
*/
@@ -128,6 +130,7 @@ public class OllamaPerameter {
*/
public OllamaPerameterBuilder removeProperty(String name) {
propertyMap.remove(name);
required.remove(name);
return this;
}
@@ -209,7 +212,7 @@ public class OllamaPerameter {
/**
* The type of the parameter.
*/
private String type;
private final String type;
/**
* Gets the type of the parameter.