Skip to content
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
6 changes: 5 additions & 1 deletion build.savant
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ void domainDSLBuilder() {

var debug = switches.has("domain-debug") ? "debug" : ""
var home = appPb.environment().get("HOME")
ProcessBuilder domainBuilder = new ProcessBuilder("${home}/dev/java/current21/bin/java", "-cp", classPath, "io.fusionauth.builders.DomainDSLBuilder", debug)
ProcessBuilder domainBuilder = new ProcessBuilder("${home}/dev/java/current21/bin/java", "-cp", classPath,
"io.fusionauth.builders.DomainDSLBuilder", debug)
def domainBuilderProcess = domainBuilder.inheritIO().directory(new File("../fusionauth-app/")).start()
domainBuilderProcess.consumeProcessOutput(System.out, System.err)
domainBuilderProcess.waitFor()
Expand Down Expand Up @@ -213,6 +214,9 @@ target(name: "build-java", description: "Build the Java Client Library") {
filter(token: ".*@MaskMapValue\\.List\\(\\{(\\n|.)*\\}\\)\\n", value: "")
filter(token: ".*@MaskMapValue\\(.*\n", value: "")
filter(token: ".*@MaskString.*\n", value: "")
// don't need this form field in the public client, it's not part of the API
filter(token: "\\s+@InternalUse\n\\s+@JsonIgnore\n\\s+public List<FormField> fieldObjects = new ArrayList<>\\(\\);\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to eliminate looking for a specific field name. I thought the @InternalUse filter below was removing the field from the client library entirely, but it's just removing the annotation.

According to the @InternalUse annotation doc, it seems it's meant to remove the field entirely from clients.

Marks a field for internal use, and should not be serialized externally or be reflected in the generated domain for other clients.

Seems like it works for libraries that we build from JSON but not for Java.

value: "")
filter(token: ".*@InternalUse.*\n ", value: "")
// don't want internal tickets and such in here
filter(token: "// TODO : ENG.*", value: "")
Expand Down
3 changes: 3 additions & 0 deletions src/main/domain/io.fusionauth.domain.form.FormStep.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"typeArguments" : [ {
"type" : "UUID"
} ]
},
"type" : {
"type" : "FormStepType"
}
}
}
6 changes: 6 additions & 0 deletions src/main/domain/io.fusionauth.domain.form.FormStepType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"packageName" : "io.fusionauth.domain.form",
"type" : "FormStepType",
"description" : "/**\n * Denotes the type of form step. This is used to configure different behavior on form steps in the registration flow.\n */\n",
"enum" : [ "collectData", "verifyEmail", "verifyPhoneNumber" ]
}
14 changes: 13 additions & 1 deletion src/main/domainNG/io.fusionauth.domain.form.FormStep.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,28 @@
"type" : "Object"
},
"fields" : {
"fieldObjects" : {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this even be here? We're filtering it out of the Java client, but this seems like it would show up in other clients.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never paid attention to the domainNG files because nothing uses them (yet) and I've never heard of a definitive plan to change that.

"className" : "java.util.List",
"type" : "List",
"typeArguments" : [ {
"className" : "io.fusionauth.domain.form.FormField",
"type" : "FormField"
} ]
},
"fields" : {
"className" : "java.util.List",
"type" : "List",
"typeArguments" : [ {
"className" : "java.util.UUID",
"type" : "UUID"
} ]
},
"type" : {
"className" : "io.fusionauth.domain.form.FormStepType",
"type" : "FormStepType"
}
},
"imports" : [ "io.fusionauth.domain.Buildable", "java.util.List", "java.util.UUID" ],
"imports" : [ "io.fusionauth.domain.Buildable", "java.util.List", "io.fusionauth.domain.form.FormField", "java.util.UUID", "io.fusionauth.domain.form.FormStepType" ],
"interfaces" : [ {
"className" : "io.fusionauth.domain.Buildable",
"type" : "Buildable",
Expand Down
8 changes: 8 additions & 0 deletions src/main/domainNG/io.fusionauth.domain.form.FormStepType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"className" : "io.fusionauth.domain.form.FormStepType",
"enum" : [ "collectData", "verifyEmail", "verifyPhoneNumber" ],
"imports" : [ ],
"objectType" : "Enum",
"packageName" : "io.fusionauth.domain.form",
"type" : "FormStepType"
}