Skip to content

Commit 878b26f

Browse files
committed
Add questionAnswers to Speaker
1 parent 3e33771 commit 878b26f

File tree

3 files changed

+119
-8
lines changed

3 files changed

+119
-8
lines changed

openapi/openapi.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ components:
447447
fullName:
448448
type: string
449449
# categoryItems - Always empty; ignored
450-
# questionAnswers - Always empty; ignored
451450
required:
452451
- fullName
453452
- isTopSpeaker
@@ -462,9 +461,14 @@ components:
462461
sessions:
463462
type: array
464463
items:
465-
$ref: '#/components/schemas/SessionMinimal' # Speakers Endpoint
464+
$ref: '#/components/schemas/SessionMinimal'
465+
questionAnswers:
466+
type: array
467+
items:
468+
$ref: '#/components/schemas/QuestionAnswerFull'
466469
required:
467470
- sessions
471+
- questionAnswers
468472
SpeakerAll:
469473
allOf:
470474
- $ref: '#/components/schemas/BaseSpeaker'
@@ -475,8 +479,13 @@ components:
475479
type: array
476480
items:
477481
type: integer # All Endpoint
482+
questionAnswers:
483+
type: array
484+
items:
485+
$ref: '#/components/schemas/QuestionAnswer'
478486
required:
479487
- sessions
488+
- questionAnswers
480489
SpeakerWithEmail:
481490
allOf:
482491
- $ref: '#/components/schemas/BaseSpeakerEssential'

sessionize-java-client/src/generated/java/software/xdev/sessionize/model/Speaker.java

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.UUID;
2828
import org.openapitools.jackson.nullable.JsonNullable;
2929
import software.xdev.sessionize.model.Link;
30+
import software.xdev.sessionize.model.QuestionAnswerFull;
3031
import software.xdev.sessionize.model.SessionMinimal;
3132
import com.fasterxml.jackson.annotation.JsonIgnore;
3233
import org.openapitools.jackson.nullable.JsonNullable;
@@ -50,7 +51,8 @@
5051
Speaker.JSON_PROPERTY_IS_TOP_SPEAKER,
5152
Speaker.JSON_PROPERTY_LINKS,
5253
Speaker.JSON_PROPERTY_FULL_NAME,
53-
Speaker.JSON_PROPERTY_SESSIONS
54+
Speaker.JSON_PROPERTY_SESSIONS,
55+
Speaker.JSON_PROPERTY_QUESTION_ANSWERS
5456
})
5557
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
5658
public class Speaker {
@@ -84,6 +86,9 @@ public class Speaker {
8486
public static final String JSON_PROPERTY_SESSIONS = "sessions";
8587
private List<SessionMinimal> sessions = new ArrayList<>();
8688

89+
public static final String JSON_PROPERTY_QUESTION_ANSWERS = "questionAnswers";
90+
private List<QuestionAnswerFull> questionAnswers = new ArrayList<>();
91+
8792
public Speaker() {
8893
}
8994

@@ -378,6 +383,40 @@ public void setSessions(List<SessionMinimal> sessions) {
378383
this.sessions = sessions;
379384
}
380385

386+
387+
public Speaker questionAnswers(List<QuestionAnswerFull> questionAnswers) {
388+
389+
this.questionAnswers = questionAnswers;
390+
return this;
391+
}
392+
393+
public Speaker addQuestionAnswersItem(QuestionAnswerFull questionAnswersItem) {
394+
if (this.questionAnswers == null) {
395+
this.questionAnswers = new ArrayList<>();
396+
}
397+
this.questionAnswers.add(questionAnswersItem);
398+
return this;
399+
}
400+
401+
/**
402+
* Get questionAnswers
403+
* @return questionAnswers
404+
**/
405+
@jakarta.annotation.Nonnull
406+
@JsonProperty(JSON_PROPERTY_QUESTION_ANSWERS)
407+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
408+
409+
public List<QuestionAnswerFull> getQuestionAnswers() {
410+
return questionAnswers;
411+
}
412+
413+
414+
@JsonProperty(JSON_PROPERTY_QUESTION_ANSWERS)
415+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
416+
public void setQuestionAnswers(List<QuestionAnswerFull> questionAnswers) {
417+
this.questionAnswers = questionAnswers;
418+
}
419+
381420
@Override
382421
public boolean equals(Object o) {
383422
if (this == o) {
@@ -396,7 +435,8 @@ public boolean equals(Object o) {
396435
Objects.equals(this.isTopSpeaker, speaker.isTopSpeaker) &&
397436
Objects.equals(this.links, speaker.links) &&
398437
Objects.equals(this.fullName, speaker.fullName) &&
399-
Objects.equals(this.sessions, speaker.sessions);
438+
Objects.equals(this.sessions, speaker.sessions) &&
439+
Objects.equals(this.questionAnswers, speaker.questionAnswers);
400440
}
401441

402442
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
@@ -405,7 +445,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)
405445

406446
@Override
407447
public int hashCode() {
408-
return Objects.hash(id, firstName, lastName, hashCodeNullable(bio), tagLine, hashCodeNullable(profilePicture), isTopSpeaker, links, fullName, sessions);
448+
return Objects.hash(id, firstName, lastName, hashCodeNullable(bio), tagLine, hashCodeNullable(profilePicture), isTopSpeaker, links, fullName, sessions, questionAnswers);
409449
}
410450

411451
private static <T> int hashCodeNullable(JsonNullable<T> a) {
@@ -429,6 +469,7 @@ public String toString() {
429469
sb.append(" links: ").append(toIndentedString(links)).append("\n");
430470
sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n");
431471
sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n");
472+
sb.append(" questionAnswers: ").append(toIndentedString(questionAnswers)).append("\n");
432473
sb.append("}");
433474
return sb.toString();
434475
}
@@ -576,6 +617,16 @@ public String toUrlQueryString(String prefix) {
576617
}
577618
}
578619

620+
// add `questionAnswers` to the URL query string
621+
if (getQuestionAnswers() != null) {
622+
for (int i = 0; i < getQuestionAnswers().size(); i++) {
623+
if (getQuestionAnswers().get(i) != null) {
624+
joiner.add(getQuestionAnswers().get(i).toUrlQueryString(String.format("%squestionAnswers%s%s", prefix, suffix,
625+
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
626+
}
627+
}
628+
}
629+
579630
return joiner.toString();
580631
}
581632

sessionize-java-client/src/generated/java/software/xdev/sessionize/model/SpeakerAll.java

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.UUID;
2828
import org.openapitools.jackson.nullable.JsonNullable;
2929
import software.xdev.sessionize.model.Link;
30+
import software.xdev.sessionize.model.QuestionAnswer;
3031
import com.fasterxml.jackson.annotation.JsonIgnore;
3132
import org.openapitools.jackson.nullable.JsonNullable;
3233
import java.util.NoSuchElementException;
@@ -49,7 +50,8 @@
4950
SpeakerAll.JSON_PROPERTY_IS_TOP_SPEAKER,
5051
SpeakerAll.JSON_PROPERTY_LINKS,
5152
SpeakerAll.JSON_PROPERTY_FULL_NAME,
52-
SpeakerAll.JSON_PROPERTY_SESSIONS
53+
SpeakerAll.JSON_PROPERTY_SESSIONS,
54+
SpeakerAll.JSON_PROPERTY_QUESTION_ANSWERS
5355
})
5456
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
5557
public class SpeakerAll {
@@ -83,6 +85,9 @@ public class SpeakerAll {
8385
public static final String JSON_PROPERTY_SESSIONS = "sessions";
8486
private List<Integer> sessions = new ArrayList<>();
8587

88+
public static final String JSON_PROPERTY_QUESTION_ANSWERS = "questionAnswers";
89+
private List<QuestionAnswer> questionAnswers = new ArrayList<>();
90+
8691
public SpeakerAll() {
8792
}
8893

@@ -377,6 +382,40 @@ public void setSessions(List<Integer> sessions) {
377382
this.sessions = sessions;
378383
}
379384

385+
386+
public SpeakerAll questionAnswers(List<QuestionAnswer> questionAnswers) {
387+
388+
this.questionAnswers = questionAnswers;
389+
return this;
390+
}
391+
392+
public SpeakerAll addQuestionAnswersItem(QuestionAnswer questionAnswersItem) {
393+
if (this.questionAnswers == null) {
394+
this.questionAnswers = new ArrayList<>();
395+
}
396+
this.questionAnswers.add(questionAnswersItem);
397+
return this;
398+
}
399+
400+
/**
401+
* Get questionAnswers
402+
* @return questionAnswers
403+
**/
404+
@jakarta.annotation.Nonnull
405+
@JsonProperty(JSON_PROPERTY_QUESTION_ANSWERS)
406+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
407+
408+
public List<QuestionAnswer> getQuestionAnswers() {
409+
return questionAnswers;
410+
}
411+
412+
413+
@JsonProperty(JSON_PROPERTY_QUESTION_ANSWERS)
414+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
415+
public void setQuestionAnswers(List<QuestionAnswer> questionAnswers) {
416+
this.questionAnswers = questionAnswers;
417+
}
418+
380419
@Override
381420
public boolean equals(Object o) {
382421
if (this == o) {
@@ -395,7 +434,8 @@ public boolean equals(Object o) {
395434
Objects.equals(this.isTopSpeaker, speakerAll.isTopSpeaker) &&
396435
Objects.equals(this.links, speakerAll.links) &&
397436
Objects.equals(this.fullName, speakerAll.fullName) &&
398-
Objects.equals(this.sessions, speakerAll.sessions);
437+
Objects.equals(this.sessions, speakerAll.sessions) &&
438+
Objects.equals(this.questionAnswers, speakerAll.questionAnswers);
399439
}
400440

401441
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
@@ -404,7 +444,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)
404444

405445
@Override
406446
public int hashCode() {
407-
return Objects.hash(id, firstName, lastName, hashCodeNullable(bio), tagLine, hashCodeNullable(profilePicture), isTopSpeaker, links, fullName, sessions);
447+
return Objects.hash(id, firstName, lastName, hashCodeNullable(bio), tagLine, hashCodeNullable(profilePicture), isTopSpeaker, links, fullName, sessions, questionAnswers);
408448
}
409449

410450
private static <T> int hashCodeNullable(JsonNullable<T> a) {
@@ -428,6 +468,7 @@ public String toString() {
428468
sb.append(" links: ").append(toIndentedString(links)).append("\n");
429469
sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n");
430470
sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n");
471+
sb.append(" questionAnswers: ").append(toIndentedString(questionAnswers)).append("\n");
431472
sb.append("}");
432473
return sb.toString();
433474
}
@@ -579,6 +620,16 @@ public String toUrlQueryString(String prefix) {
579620
}
580621
}
581622

623+
// add `questionAnswers` to the URL query string
624+
if (getQuestionAnswers() != null) {
625+
for (int i = 0; i < getQuestionAnswers().size(); i++) {
626+
if (getQuestionAnswers().get(i) != null) {
627+
joiner.add(getQuestionAnswers().get(i).toUrlQueryString(String.format("%squestionAnswers%s%s", prefix, suffix,
628+
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
629+
}
630+
}
631+
}
632+
582633
return joiner.toString();
583634
}
584635

0 commit comments

Comments
 (0)