Skip to content

Commit 3e33771

Browse files
committed
Reformat
1 parent 7e992f9 commit 3e33771

File tree

2 files changed

+98
-91
lines changed

2 files changed

+98
-91
lines changed

openapi/openapi.yml

Lines changed: 81 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -154,37 +154,37 @@ components:
154154
- sort
155155
CategorySession:
156156
allOf:
157-
- $ref: '#/components/schemas/BaseCategory'
158-
- type: object
159-
readOnly: true
160-
properties:
161-
name:
162-
type: string
163-
categoryItems:
164-
type: array
165-
items:
166-
$ref: '#/components/schemas/CategoryItem'
167-
required:
168-
- name
169-
- categoryItems
157+
- $ref: '#/components/schemas/BaseCategory'
158+
- type: object
159+
readOnly: true
160+
properties:
161+
name:
162+
type: string
163+
categoryItems:
164+
type: array
165+
items:
166+
$ref: '#/components/schemas/CategoryItem'
167+
required:
168+
- name
169+
- categoryItems
170170
CategoryAll:
171171
allOf:
172-
- $ref: '#/components/schemas/BaseCategory'
173-
- type: object
174-
readOnly: true
175-
properties:
176-
title:
177-
type: string
178-
items:
179-
type: array
172+
- $ref: '#/components/schemas/BaseCategory'
173+
- type: object
174+
readOnly: true
175+
properties:
176+
title:
177+
type: string
180178
items:
181-
$ref: '#/components/schemas/CategoryItemAll'
182-
type:
183-
type: string
184-
required:
185-
- title
186-
- items
187-
- type
179+
type: array
180+
items:
181+
$ref: '#/components/schemas/CategoryItemAll'
182+
type:
183+
type: string
184+
required:
185+
- items
186+
- title
187+
- type
188188
CategoryItem:
189189
type: object
190190
readOnly: true
@@ -198,14 +198,14 @@ components:
198198
- name
199199
CategoryItemAll:
200200
allOf:
201-
- $ref: '#/components/schemas/CategoryItem'
202-
- type: object
203-
readOnly: true
204-
properties:
205-
sort:
206-
type: integer
207-
required:
208-
- sort
201+
- $ref: '#/components/schemas/CategoryItem'
202+
- type: object
203+
readOnly: true
204+
properties:
205+
sort:
206+
type: integer
207+
required:
208+
- sort
209209
Link:
210210
type: object
211211
readOnly: true
@@ -335,54 +335,53 @@ components:
335335
- title
336336
Session:
337337
allOf:
338-
- $ref: '#/components/schemas/BaseSession'
339-
- type: object
340-
readOnly: true
341-
properties:
342-
id:
343-
type: string
344-
format: integer # Sessions Endpoint contains only numeric IDs
345-
room:
346-
type: string
347-
nullable: true
348-
speakers:
349-
type: array
350-
items:
351-
$ref: '#/components/schemas/SpeakerMinimal'
352-
questionAnswers:
353-
type: array
354-
items:
355-
$ref: '#/components/schemas/QuestionAnswerFull'
356-
categories:
357-
type: array
358-
items:
359-
$ref: '#/components/schemas/CategorySession'
360-
required:
361-
- id
362-
- room
363-
- questionAnswers
364-
- speakers
365-
- categories
338+
- $ref: '#/components/schemas/BaseSession'
339+
- type: object
340+
readOnly: true
341+
properties:
342+
id:
343+
type: string
344+
format: integer # Sessions Endpoint contains only numeric IDs
345+
room:
346+
type: string
347+
nullable: true
348+
speakers:
349+
type: array
350+
items:
351+
$ref: '#/components/schemas/SpeakerMinimal'
352+
questionAnswers:
353+
type: array
354+
items:
355+
$ref: '#/components/schemas/QuestionAnswerFull'
356+
categories:
357+
type: array
358+
items:
359+
$ref: '#/components/schemas/CategorySession'
360+
required:
361+
- id
362+
- questionAnswers
363+
- speakers
364+
- categories
366365
SessionAll:
367366
allOf:
368-
- $ref: '#/components/schemas/BaseSession'
369-
- type: object
370-
readOnly: true
371-
properties:
372-
id:
373-
type: string # All Endpoint contains numeric IDs mixed with UUIDs
374-
speakers:
375-
type: array
376-
items:
377-
type: string # All Endpoint
378-
questionAnswers:
379-
type: array
380-
items:
381-
$ref: '#/components/schemas/QuestionAnswer' # All Endpoint
382-
required:
383-
- id
384-
- questionAnswers
385-
- speakers
367+
- $ref: '#/components/schemas/BaseSession'
368+
- type: object
369+
readOnly: true
370+
properties:
371+
id:
372+
type: string # All Endpoint contains numeric IDs mixed with UUIDs
373+
speakers:
374+
type: array
375+
items:
376+
type: string # All Endpoint
377+
questionAnswers:
378+
type: array
379+
items:
380+
$ref: '#/components/schemas/QuestionAnswer' # All Endpoint
381+
required:
382+
- id
383+
- questionAnswers
384+
- speakers
386385
SessionGroup:
387386
type: object
388387
readOnly: true

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public class Session {
9999
private Integer id;
100100

101101
public static final String JSON_PROPERTY_ROOM = "room";
102-
private String room;
102+
private JsonNullable<String> room = JsonNullable.<String>undefined();
103103

104104
public static final String JSON_PROPERTY_SPEAKERS = "speakers";
105105
private List<SpeakerMinimal> speakers = new ArrayList<>();
@@ -458,8 +458,8 @@ public void setId(Integer id) {
458458

459459

460460
public Session room(String room) {
461+
this.room = JsonNullable.<String>of(room);
461462

462-
this.room = room;
463463
return this;
464464
}
465465

@@ -468,20 +468,28 @@ public Session room(String room) {
468468
* @return room
469469
**/
470470
@jakarta.annotation.Nullable
471-
@JsonProperty(JSON_PROPERTY_ROOM)
472-
@JsonInclude(value = JsonInclude.Include.ALWAYS)
471+
@JsonIgnore
473472

474473
public String getRoom() {
475-
return room;
474+
return room.orElse(null);
476475
}
477476

477+
@JsonProperty(JSON_PROPERTY_ROOM)
478+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
478479

480+
public JsonNullable<String> getRoom_JsonNullable() {
481+
return room;
482+
}
483+
479484
@JsonProperty(JSON_PROPERTY_ROOM)
480-
@JsonInclude(value = JsonInclude.Include.ALWAYS)
481-
public void setRoom(String room) {
485+
public void setRoom_JsonNullable(JsonNullable<String> room) {
482486
this.room = room;
483487
}
484488

489+
public void setRoom(String room) {
490+
this.room = JsonNullable.<String>of(room);
491+
}
492+
485493

486494
public Session speakers(List<SpeakerMinimal> speakers) {
487495

@@ -605,7 +613,7 @@ public boolean equals(Object o) {
605613
equalsNullable(this.recordingUrl, session.recordingUrl) &&
606614
Objects.equals(this.status, session.status) &&
607615
Objects.equals(this.id, session.id) &&
608-
Objects.equals(this.room, session.room) &&
616+
equalsNullable(this.room, session.room) &&
609617
Objects.equals(this.speakers, session.speakers) &&
610618
Objects.equals(this.questionAnswers, session.questionAnswers) &&
611619
Objects.equals(this.categories, session.categories);
@@ -617,7 +625,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)
617625

618626
@Override
619627
public int hashCode() {
620-
return Objects.hash(title, hashCodeNullable(description), startsAt, endsAt, isServiceSession, isPlenumSession, categoryItems, roomId, hashCodeNullable(liveUrl), hashCodeNullable(recordingUrl), status, id, room, speakers, questionAnswers, categories);
628+
return Objects.hash(title, hashCodeNullable(description), startsAt, endsAt, isServiceSession, isPlenumSession, categoryItems, roomId, hashCodeNullable(liveUrl), hashCodeNullable(recordingUrl), status, id, hashCodeNullable(room), speakers, questionAnswers, categories);
621629
}
622630

623631
private static <T> int hashCodeNullable(JsonNullable<T> a) {

0 commit comments

Comments
 (0)